Android patches
This commit is contained in:
@@ -2005,7 +2005,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];
|
||||
@@ -2015,6 +2015,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;
|
||||
@@ -2025,11 +2026,11 @@ bool MissingGlyphSearcher::FindMissingGlyphs(const char **str)
|
||||
size = FS_LARGE;
|
||||
} 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. */
|
||||
|
||||
Reference in New Issue
Block a user