mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Fixed the error message when the wrong bitmap font size is selected
This commit is contained in:
parent
cc3c748ab2
commit
b47f738635
@ -777,17 +777,22 @@ bool Font::setCurrentSize(unsigned int characterSize) const
|
||||
err() << "Failed to set bitmap font size to " << characterSize << std::endl;
|
||||
err() << "Available sizes are: ";
|
||||
for (int i = 0; i < face->num_fixed_sizes; ++i)
|
||||
err() << face->available_sizes[i].height << " ";
|
||||
{
|
||||
const unsigned int size = (face->available_sizes[i].y_ppem + 32) >> 6;
|
||||
err() << size << " ";
|
||||
}
|
||||
err() << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
err() << "Failed to set font size to " << characterSize << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return result == FT_Err_Ok;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user