aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJohannes Schickel2012-01-09 03:33:59 +0100
committerWillem Jan Palenstijn2012-01-29 16:26:20 +0100
commitf63df3bf7b95ddd9eaa4f55c4f21f53f3bd00f68 (patch)
treeb7ec71daf5c1d957c818e62ec87cd079fa7f2dbc /gui
parent9f3fbe1bd773664b1e86241e71875cd97230d791 (diff)
downloadscummvm-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.cpp8
-rw-r--r--gui/themes/translations.datbin285893 -> 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
index 447b7b97dd..4fab3f6f6a 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ