Fix #6465: Add {NORMAL_FONT} and {MONO_FONT} control codes to GS strings (#6726)

This commit is contained in:
Pavel Stupnikov
2018-04-17 20:41:31 +03:00
committed by PeterN
parent 4d6a5fbec4
commit 9175c349da
4 changed files with 13 additions and 11 deletions

View File

@@ -2014,10 +2014,8 @@ bool MissingGlyphSearcher::FindMissingGlyphs(const char **str)
FontSize size = this->DefaultSize();
if (str != NULL) *str = text;
for (WChar c = Utf8Consume(&text); c != '\0'; c = Utf8Consume(&text)) {
if (c == SCC_TINYFONT) {
size = FS_SMALL;
} else if (c == SCC_BIGFONT) {
size = FS_LARGE;
if (c >= SCC_FIRST_FONT && c <= SCC_LAST_FONT) {
size = (FontSize)(c - SCC_FIRST_FONT);
} 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;