projects
/
IvanGame.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
516b323
)
Render all text with the UTF-8 encoding.
author
Matt Mullins
<mokomull@gmail.com>
Wed, 30 May 2012 05:10:46 +0000
(22:10 -0700)
committer
Matt Mullins
<mokomull@gmail.com>
Wed, 30 May 2012 05:10:46 +0000
(22:10 -0700)
This fixes issues where Japanese characters are showing up as boxes.
Level.cpp
patch
|
blob
|
history
diff --git
a/Level.cpp
b/Level.cpp
index
588439b
..
d16b65e
100644
(file)
--- a/
Level.cpp
+++ b/
Level.cpp
@@
-55,10
+55,8
@@
void SDL_GL_RenderText(string s, TTF_Font *font, SDL_Color color, SDL_Rect *loca
int w,h;
Texture texture;
- Uint16 t[] = {'日','本','語'};
-
/* Use SDL_TTF to render our text */
- initial =
unicode?TTF_RenderUNICODE_Blended(font, t, color):TTF_RenderText_Blended(font, text
, color);
+ initial =
TTF_RenderUTF8_Blended(font, s.c_str()
, color);
/* Convert the rendered text to a known format */
w = initial->w;