mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-17 00:07:44 +00:00
Merge pull request #3467 from bparker06/utf8_fix
fix rendering of utf8 glyphs
This commit is contained in:
commit
0e1ac30843
@ -216,8 +216,9 @@ static int gl_get_message_width(void *data, const char *msg,
|
|||||||
{
|
{
|
||||||
for (i = 0; i < msg_len; i++)
|
for (i = 0; i < msg_len; i++)
|
||||||
{
|
{
|
||||||
|
const char *msg_tmp = &msg[i];
|
||||||
const struct font_glyph *glyph =
|
const struct font_glyph *glyph =
|
||||||
font->font_driver->get_glyph(font->font_data, msg[i]);
|
font->font_driver->get_glyph(font->font_data, utf8_walk(&msg_tmp));
|
||||||
|
|
||||||
if (!glyph) /* Do something smarter here ... */
|
if (!glyph) /* Do something smarter here ... */
|
||||||
glyph = font->font_driver->get_glyph(font->font_data, '?');
|
glyph = font->font_driver->get_glyph(font->font_data, '?');
|
||||||
@ -298,8 +299,10 @@ static void gl_raster_font_render_line(
|
|||||||
for (i = 0; i < msg_len; i++)
|
for (i = 0; i < msg_len; i++)
|
||||||
{
|
{
|
||||||
int off_x, off_y, tex_x, tex_y, width, height;
|
int off_x, off_y, tex_x, tex_y, width, height;
|
||||||
|
const char *msg_tmp = &msg[i];
|
||||||
|
|
||||||
const struct font_glyph *glyph =
|
const struct font_glyph *glyph =
|
||||||
font->font_driver->get_glyph(font->font_data, msg[i]);
|
font->font_driver->get_glyph(font->font_data, utf8_walk(&msg_tmp));
|
||||||
|
|
||||||
if (!glyph) /* Do something smarter here ... */
|
if (!glyph) /* Do something smarter here ... */
|
||||||
glyph = font->font_driver->get_glyph(font->font_data, '?');
|
glyph = font->font_driver->get_glyph(font->font_data, '?');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user