ALL: sync with scummvm
This commit is contained in:
parent
0c962164d4
commit
7329a5d164
126 changed files with 2443 additions and 1679 deletions
|
@ -561,7 +561,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) {
|
|||
if (file == "default") {
|
||||
_texts[textId]->_fontPtr = _font;
|
||||
} else {
|
||||
Common::String localized = genLocalizedFontFilename(file);
|
||||
Common::String localized = FontMan.genLocalizedFontFilename(file);
|
||||
// Try built-in fonts
|
||||
_texts[textId]->_fontPtr = FontMan.getFontByName(localized);
|
||||
|
||||
|
@ -1467,32 +1467,6 @@ Common::String ThemeEngine::genCacheFilename(const Common::String &filename) con
|
|||
return Common::String();
|
||||
}
|
||||
|
||||
Common::String ThemeEngine::genLocalizedFontFilename(const Common::String &filename) const {
|
||||
#ifndef USE_TRANSLATION
|
||||
return filename;
|
||||
#else
|
||||
// We will transform the font filename in the following way:
|
||||
// name.bdf
|
||||
// will become:
|
||||
// name-charset.bdf
|
||||
// Note that name should not contain any dot here!
|
||||
|
||||
// In the first step we look for the dot. In case there is none we will
|
||||
// return the normal filename.
|
||||
Common::String::const_iterator dot = Common::find(filename.begin(), filename.end(), '.');
|
||||
if (dot == filename.end())
|
||||
return filename;
|
||||
|
||||
// Put the translated font filename string back together.
|
||||
Common::String result(filename.begin(), dot);
|
||||
result += '-';
|
||||
result += TransMan.getCurrentCharset();
|
||||
result += dot;
|
||||
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************
|
||||
* Static Theme XML functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue