diff options
author | Johannes Schickel | 2012-01-09 03:33:59 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2012-01-29 16:26:20 +0100 |
commit | f63df3bf7b95ddd9eaa4f55c4f21f53f3bd00f68 (patch) | |
tree | b7ec71daf5c1d957c818e62ec87cd079fa7f2dbc /gui | |
parent | 9f3fbe1bd773664b1e86241e71875cd97230d791 (diff) | |
download | scummvm-rg350-f63df3bf7b95ddd9eaa4f55c4f21f53f3bd00f68.tar.gz scummvm-rg350-f63df3bf7b95ddd9eaa4f55c4f21f53f3bd00f68.tar.bz2 scummvm-rg350-f63df3bf7b95ddd9eaa4f55c4f21f53f3bd00f68.zip |
GRAPHICS/GUI: Implement charset mapping for TTF fonts.
The charsets used by the translations now need to have a "$(name).cp" file,
which contains an charset index => unicode mapping. Otherwise
create_translations will fail.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeEngine.cpp | 8 | ||||
-rw-r--r-- | gui/themes/translations.dat | bin | 285893 -> 287971 bytes |
2 files changed, 1 insertions, 7 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 46a0eda0c5..3cfa5550ed 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1399,12 +1399,6 @@ DrawData ThemeEngine::parseDrawDataId(const Common::String &name) const { const Graphics::Font *ThemeEngine::loadScalableFont(const Common::String &filename, const Common::String &charset, const int pointsize, Common::String &name) { #ifdef USE_FREETYPE2 - // We only support ISO-8859-1 for TTF right now. - if (!charset.empty() - && !charset.equalsIgnoreCase("iso-8859-1") - && !charset.equalsIgnoreCase("ascii")) - return 0; - name = Common::String::format("%s-%s@%d", filename.c_str(), charset.c_str(), pointsize); // Try already loaded fonts. @@ -1418,7 +1412,7 @@ const Graphics::Font *ThemeEngine::loadScalableFont(const Common::String &filena for (Common::ArchiveMemberList::const_iterator i = members.begin(), end = members.end(); i != end; ++i) { Common::SeekableReadStream *stream = (*i)->createReadStream(); if (stream) { - font = Graphics::loadTTFFont(*stream, pointsize, false); + font = Graphics::loadTTFFont(*stream, pointsize, false, TransMan.getCharsetMapping()); delete stream; if (font) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex 447b7b97dd..4fab3f6f6a 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat |