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:
parent
9c99da337a
commit
022c6ae49c
3 changed files with 10 additions and 4 deletions
2
Makefile
2
Makefile
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
# The version number, for release:
|
# The version number, for release:
|
||||||
|
|
||||||
VER_VERSION=0.9.16rc2
|
VER_VERSION=0.9.16rc4
|
||||||
VER_DATE=`date +"%Y-%m-%d"`
|
VER_DATE=`date +"%Y-%m-%d"`
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,9 @@ $Id$
|
||||||
* Using DejaVu Sans Condensed as default UI font now.
|
* Using DejaVu Sans Condensed as default UI font now.
|
||||||
http://dejavu.sourceforge.net/
|
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
|
* Brazilian Portuguese
|
||||||
Fred Ulisses Maranhao <fred_maranhao@yahoo.com.br>
|
Fred Ulisses Maranhao <fred_maranhao@yahoo.com.br>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9307,10 +9307,13 @@ static void wordwrap_text(const char *const str, SDL_Color color,
|
||||||
int len;
|
int len;
|
||||||
SDL_Surface *text;
|
SDL_Surface *text;
|
||||||
SDL_Rect dest, src;
|
SDL_Rect dest, src;
|
||||||
|
TTF_Font *myfont = medium_font;
|
||||||
|
|
||||||
int utf8_str_len, last_text_height;
|
int utf8_str_len, last_text_height;
|
||||||
unsigned char utf8_str[512];
|
unsigned char utf8_str[512];
|
||||||
|
|
||||||
|
if (need_own_font && strcmp(gettext(str), str))
|
||||||
|
myfont = locale_font;
|
||||||
|
|
||||||
/* Cursor starting position: */
|
/* 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')
|
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)
|
if (!text)
|
||||||
continue; /* Didn't render anything... */
|
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')
|
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 (text != NULL)
|
||||||
{
|
{
|
||||||
if (x + text->w > right)
|
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... */
|
/* 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! */
|
/* If it won't fit on this line, move to the next! */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue