Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-11-23 15:19:18 +0300
committerTon Roosendaal <ton@blender.org>2004-11-23 15:19:18 +0300
commitd6a36633c5e9a7ff80ce01bfccecbfbab23063d8 (patch)
tree576d957925f02dd9b1eb96304b0b0429fb83c87f /source/blender/ftfont
parentf8c2ce93b978dbcb1e197fa30a0557c405856fcc (diff)
Patch provided by Yann Vernier
This patch should make gettext return unicode, which is what freetype expects (also explicitly set in the same file). It makes translations that support non-ascii *and* non-unicode encodings, such as latin 1 for western european languages, draw correctly. The problem only occurs for platforms where those encodings are default, i.e. in Linux if /etc/locale.gen looks like this: sv_SE ISO-8859-15 If it were to read UTF-8 this patch doesn't change the behaviour at all. This is probably the case for Mac OS X and perhaps Windows.
Diffstat (limited to 'source/blender/ftfont')
-rw-r--r--source/blender/ftfont/intern/FTF_TTFont.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/ftfont/intern/FTF_TTFont.cpp b/source/blender/ftfont/intern/FTF_TTFont.cpp
index d089abe5c49..5be311a4f10 100644
--- a/source/blender/ftfont/intern/FTF_TTFont.cpp
+++ b/source/blender/ftfont/intern/FTF_TTFont.cpp
@@ -226,6 +226,7 @@ void FTF_TTFont::SetLanguage(char* str)
bindtextdomain(DOMAIN_NAME, messagepath);
+ bind_textdomain_codeset(DOMAIN_NAME, encoding_name);
textdomain(DOMAIN_NAME);
strcpy(language, str);
@@ -235,6 +236,7 @@ void FTF_TTFont::SetLanguage(char* str)
void FTF_TTFont::SetEncoding(char* str)
{
strcpy(encoding_name, str);
+ bind_textdomain_codeset(DOMAIN_NAME, encoding_name);
}