[Scummvm-cvs-logs] scummvm master -> 52adf5135b7b075c1cfc63ce8094538edf279039

RichieSams adastley at gmail.com
Sat Feb 14 19:07:08 CET 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

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


Commit: 52adf5135b7b075c1cfc63ce8094538edf279039
    https://github.com/scummvm/scummvm/commit/52adf5135b7b075c1cfc63ce8094538edf279039
Author: RichieSams (adastley at gmail.com)
Date: 2015-02-14T12:06:30-06:00

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

Changed paths:
    engines/zvision/text/truetype_font.cpp



diff --git a/engines/zvision/text/truetype_font.cpp b/engines/zvision/text/truetype_font.cpp
index 8e402ef..7ad8d6d 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;






More information about the Scummvm-git-logs mailing list