GUI: Fix loading fonts when translations are disabled
This fixes bug #12737. The issue is that ThemeEngine::addFont was skipping every font when translations are disabled, including those for the English language. Indeed for those the function is called with language of "*" (since this is what is specified in the theme) and not an empty string as the implementation assumed.
This commit is contained in:
parent
0592520ddf
commit
fe41c9bd7d
1 changed files with 3 additions and 3 deletions
|
@ -526,14 +526,14 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &language, const
|
||||||
if (!language.empty()) {
|
if (!language.empty()) {
|
||||||
#ifdef USE_TRANSLATION
|
#ifdef USE_TRANSLATION
|
||||||
Common::String cl = TransMan.getCurrentLanguage();
|
Common::String cl = TransMan.getCurrentLanguage();
|
||||||
|
#else
|
||||||
|
Common::String cl("C");
|
||||||
|
#endif
|
||||||
if (!cl.matchString(language, true))
|
if (!cl.matchString(language, true))
|
||||||
return true; // Skip
|
return true; // Skip
|
||||||
|
|
||||||
if (_texts[textId] != nullptr) // We already loaded something
|
if (_texts[textId] != nullptr) // We already loaded something
|
||||||
return true;
|
return true;
|
||||||
#else
|
|
||||||
return true; // Safely ignore
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_texts[textId] != nullptr)
|
if (_texts[textId] != nullptr)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue