Changeset - r18391:f9da766e3e8a
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2011-11-16 23:02:51
rubidium@openttd.org
(svn r23237) -Fix: ignore special characters, such as the train "character", when determining a fallback font
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -1771,25 +1771,25 @@ static bool FindMissingGlyphs(const char
 
			for (WChar c = Utf8Consume(&text); c != '\0'; c = Utf8Consume(&text)) {
 
				if (c == SCC_SETX) {
 
					/* SetX is, together with SetXY as special character that
 
					 * uses the next (two) characters as data points. We have
 
					 * to skip those, otherwise the UTF8 reading will go haywire. */
 
					text++;
 
				} else if (c == SCC_SETXY) {
 
					text += 2;
 
				} else if (c == SCC_TINYFONT) {
 
					size = FS_SMALL;
 
				} else if (c == SCC_BIGFONT) {
 
					size = FS_LARGE;
 
				} else if (IsPrintable(c) && !IsTextDirectionChar(c) && c != '?' && GetGlyph(size, c) == question_mark[size]) {
 
				} else if (!IsInsideMM(c, SCC_SPRITE_START, SCC_SPRITE_END) && IsPrintable(c) && !IsTextDirectionChar(c) && c != '?' && GetGlyph(size, c) == question_mark[size]) {
 
					/* The character is printable, but not in the normal font. This is the case we were testing for. */
 
					return true;
 
				}
 
			}
 
		}
 
	}
 
	return false;
 
}
 

	
 
/**
 
 * Check whether the currently loaded language pack
 
 * uses characters that the currently loaded font
0 comments (0 inline, 0 general)