GRAPHICS: Remove obsolete genLocalizedFontFilename FontManager

This function supported loading alternative bdf fonts when we were
using 8 bits encodings for the translations. Now that we are using
unicode for all language, this is no longer needed.
This commit is contained in:
Thierry Crozat 2021-09-20 21:43:17 +01:00
parent 6043a4e40c
commit f3829243a1
3 changed files with 10 additions and 65 deletions

View file

@ -195,30 +195,4 @@ const Font *FontManager::getFontByUsage(FontUsage usage) const {
return 0;
}
Common::String FontManager::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
}
} // End of namespace Graphics