diff options
author | RichieSams | 2015-02-14 12:06:14 -0600 |
---|---|---|
committer | RichieSams | 2015-02-14 12:06:30 -0600 |
commit | 52adf5135b7b075c1cfc63ce8094538edf279039 (patch) | |
tree | f2e0ccebe17151ca25ba16af5bfd77d9147bd466 | |
parent | 53a2c30cb014997887e29f5fd0db1348d05990f0 (diff) | |
download | scummvm-rg350-52adf5135b7b075c1cfc63ce8094538edf279039.tar.gz scummvm-rg350-52adf5135b7b075c1cfc63ce8094538edf279039.tar.bz2 scummvm-rg350-52adf5135b7b075c1cfc63ce8094538edf279039.zip |
ZVISION: Check for point and style changes when early breaking from a font change
-rw-r--r-- | engines/zvision/text/truetype_font.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; |