- added a CanPrint function to FFont and used that to handle the statistics display on the automap HUD to only replace the font when actually needed, not based on the language.

This commit is contained in:
Christoph Oelckers 2019-04-22 09:08:43 +02:00
commit e0a0be4f7b
8 changed files with 119 additions and 29 deletions

View file

@ -140,20 +140,7 @@ bool CheckFontComplete(FFont *font)
{
// Also check if the SmallFont contains all characters this language needs.
// If not, switch back to the original one.
const uint8_t* checkstr = (const uint8_t*)GStrings["REQUIRED_CHARACTERS"];
bool incomplete = false;
if (!checkstr) return true;
while (int c = GetCharFromString(checkstr))
{
bool redirected;
int cc = font->GetCharCode(c, true);
if (c != cc && (c != 0x1e9e || cc != 0xdf))
{
return false;
}
}
return true;
return font->CanPrint(GStrings["REQUIRED_CHARACTERS"]);
}
void UpdateGenericUI(bool cvar)