From 8198ea61beeb62c4ad86cc6bd1b91f4b756928ef Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Tue, 10 Jul 2007 15:10:32 +0000 Subject: Update to the translation code. Patch provided by dripstone. Basically move stuff out of filesel.c and into language.c and changes when exactly it does the conversion. It was doing it when not needed for some machines. It probably still needs work but its slowly getting better. I also removed some commented out code. Kent --- source/blender/ftfont/intern/FTF_TTFont.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/ftfont') diff --git a/source/blender/ftfont/intern/FTF_TTFont.cpp b/source/blender/ftfont/intern/FTF_TTFont.cpp index a4d81fe0133..34b22e5c9d2 100644 --- a/source/blender/ftfont/intern/FTF_TTFont.cpp +++ b/source/blender/ftfont/intern/FTF_TTFont.cpp @@ -335,6 +335,8 @@ float FTF_TTFont::DrawString(char* str, unsigned int flag) removes special characters completely. So, for now we just skip that then. (ton) */ if (FTF_USE_GETTEXT & flag) utf8towchar(wstr, gettext(str)); + else if (FTF_INPUT_UTF8 & flag) + utf8towchar(wstr, str); glGetFloatv(GL_CURRENT_COLOR, color); @@ -344,7 +346,7 @@ float FTF_TTFont::DrawString(char* str, unsigned int flag) glPixelTransferf(GL_GREEN_SCALE, color[1]); glPixelTransferf(GL_BLUE_SCALE, color[2]); - if (FTF_USE_GETTEXT & flag) + if ((FTF_USE_GETTEXT | FTF_INPUT_UTF8) & flag) font->Render(wstr); else font->Render(str); @@ -362,7 +364,7 @@ float FTF_TTFont::DrawString(char* str, unsigned int flag) glTranslatef(pen_x, pen_y, 0.0); glScalef(fsize, fsize, 1.0); - if (FTF_USE_GETTEXT & flag) + if ((FTF_USE_GETTEXT | FTF_INPUT_UTF8) & flag) font->Render(wstr); else font->Render(str); @@ -373,7 +375,7 @@ float FTF_TTFont::DrawString(char* str, unsigned int flag) glDisable(GL_TEXTURE_2D); } - if (FTF_USE_GETTEXT & flag) + if ((FTF_USE_GETTEXT | FTF_INPUT_UTF8) & flag) return font->Advance(wstr); else return font->Advance(str); -- cgit v1.2.3