ZVISION: Check for point and style changes when early breaking from a font change

This commit is contained in:
RichieSams 2015-02-14 12:06:14 -06:00
parent 53a2c30cb0
commit 52adf5135b

View File

@ -65,14 +65,14 @@ StyledTTFont::~StyledTTFont() {
}
bool StyledTTFont::loadFont(const Common::String &fontName, int32 point, uint style) {
_style = style;
// Don't re-load the font if we've already loaded it
// We have to check for empty so we can default to Arial
if (!fontName.empty() && _fontName.equalsIgnoreCase(fontName)) {
if (!fontName.empty() && _fontName.equalsIgnoreCase(fontName) && _lineHeight == point && _style == style) {
return true;
}
_style = style;
Common::String newFontName;
Common::String freeFontName;
Common::String liberationFontName;