diff options
author | Kent Mein <mein@cs.umn.edu> | 2007-07-10 19:10:32 +0400 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2007-07-10 19:10:32 +0400 |
commit | 8198ea61beeb62c4ad86cc6bd1b91f4b756928ef (patch) | |
tree | ccd2b51c14973468f9b9a07672f51326a16d4bb2 /source/blender/ftfont | |
parent | 9a07d9cd98d0dd09ce4a6837d27ce352d76f727d (diff) |
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
Diffstat (limited to 'source/blender/ftfont')
-rw-r--r-- | source/blender/ftfont/intern/FTF_TTFont.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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); |