From cf5270f5cea061259ff4a9e2b422e446aa516d5f Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Sat, 19 Jul 2003 11:20:23 +0000 Subject: [PATCH] Bound gettext to UTF-8 domain to allow UTF8 font rendering, but still support non-UTF-8 translations (like Spanish) to come out right. Thanks to many! --- docs/CHANGES.txt | 5 +++++ src/tuxpaint.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 9639ff716..3062d65d6 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -34,6 +34,11 @@ http://www.newbreedsoftware.com/tuxpaint/ Fonts copyright the Free Software Foundation. Thanks to Mantas Kriauciunas for the tip. + * Fixed UTF-8 related bug where Lithuanian wouldn't display if using + 'TTF_RenderText...', but Spanish wouldn't display if using + 'TTF_RenderUTF8...'. Thanks to Mantas Kriauciunas, Robert Glowczynski, + John Popplewell and Karl Ove Hufthammer. + 2003.Jun.17 (0.9.11) * Windows bugfixes. diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 887ec3e72..7b668de5b 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -216,7 +216,7 @@ void win32_perror(const char *str) #define clamp(lo,value,hi) (min(max(value,lo),hi)) -#define RENDER_TEXT TTF_RenderText_Blended +#define RENDER_TEXT TTF_RenderUTF8_Blended /* Possible languages: */ @@ -3948,6 +3948,7 @@ void setup(int argc, char * argv[]) bindtextdomain("tuxpaint", LOCALEDIR); + bind_textdomain_codeset("tuxpaint", "UTF8"); textdomain("tuxpaint");