Merge remote-tracking branch 'origin/master' into HEAD

This commit is contained in:
Sergii Pylypenko
2019-04-23 18:16:24 +03:00
179 changed files with 6418 additions and 1144 deletions

View File

@@ -2010,7 +2010,7 @@ const char *GetCurrentLanguageIsoCode()
* @return If glyphs are missing, return \c true, else return \c false.
* @post If \c true is returned and str is not NULL, *str points to a string that is found to contain at least one missing glyph.
*/
bool MissingGlyphSearcher::FindMissingGlyphs(const char **str)
int MissingGlyphSearcher::FindMissingGlyphs(const char **str)
{
InitFreeType(this->Monospace());
const Sprite *question_mark[FS_END];
@@ -2020,6 +2020,7 @@ bool MissingGlyphSearcher::FindMissingGlyphs(const char **str)
}
this->Reset();
int missing = 0;
for (const char *text = this->NextString(); text != NULL; text = this->NextString()) {
FontSize size = this->DefaultSize();
if (str != NULL) *str = text;
@@ -2028,11 +2029,11 @@ bool MissingGlyphSearcher::FindMissingGlyphs(const char **str)
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;
missing++;
}
}
}
return false;
return missing;
}
/** Helper for searching through the language pack. */