Making sure default UI font is used for untranslated strings.

(Hindi font, for example, didn't seem to have roman characters.)
This commit is contained in:
William Kendrick 2006-10-11 18:20:41 +00:00
parent 9c99da337a
commit 022c6ae49c
3 changed files with 10 additions and 4 deletions

View file

@ -12,7 +12,7 @@
# The version number, for release:
VER_VERSION=0.9.16rc2
VER_VERSION=0.9.16rc4
VER_DATE=`date +"%Y-%m-%d"`

View file

@ -157,6 +157,9 @@ $Id$
* Using DejaVu Sans Condensed as default UI font now.
http://dejavu.sourceforge.net/
* Making sure default UI font is used for untranslated strings.
(Hindi font, for example, didn't seem to have roman characters.)
* Brazilian Portuguese
Fred Ulisses Maranhao <fred_maranhao@yahoo.com.br>

View file

@ -9307,10 +9307,13 @@ static void wordwrap_text(const char *const str, SDL_Color color,
int len;
SDL_Surface *text;
SDL_Rect dest, src;
TTF_Font *myfont = medium_font;
int utf8_str_len, last_text_height;
unsigned char utf8_str[512];
if (need_own_font && strcmp(gettext(str), str))
myfont = locale_font;
/* Cursor starting position: */
@ -9354,7 +9357,7 @@ static void wordwrap_text(const char *const str, SDL_Color color,
if (locale_str[i] == ' ' || locale_str[i] == '\0')
{
text = render_text(locale_font, (char *) utf8_str, color);
text = render_text(myfont, (char *) utf8_str, color);
if (!text)
continue; /* Didn't render anything... */
@ -9420,7 +9423,7 @@ static void wordwrap_text(const char *const str, SDL_Color color,
if (utf8_char[0] != '\0')
{
text = render_text(locale_font, (char *) utf8_char, color);
text = render_text(myfont, (char *) utf8_char, color);
if (text != NULL)
{
if (x + text->w > right)
@ -9555,7 +9558,7 @@ static void wordwrap_text(const char *const str, SDL_Color color,
/* Render the word for display... */
text = render_text(locale_font, substr, color);
text = render_text(myfont, substr, color);
/* If it won't fit on this line, move to the next! */