From 52adf5135b7b075c1cfc63ce8094538edf279039 Mon Sep 17 00:00:00 2001 From: RichieSams Date: Sat, 14 Feb 2015 12:06:14 -0600 Subject: ZVISION: Check for point and style changes when early breaking from a font change --- engines/zvision/text/truetype_font.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/zvision/text/truetype_font.cpp b/engines/zvision/text/truetype_font.cpp index 8e402efc08..7ad8d6db61 100644 --- a/engines/zvision/text/truetype_font.cpp +++ b/engines/zvision/text/truetype_font.cpp @@ -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; -- cgit v1.2.3