fixed opengl font string width calculation

This commit is contained in:
vurtun 2015-06-05 22:55:17 +02:00
parent 34014b472b
commit 06c3c57954

View File

@ -259,7 +259,7 @@ font_get_text_width(gui_handle handle, const gui_char *t, gui_size l)
glyph_len = gui_utf_decode(t + text_len, &unicode, l - text_len); glyph_len = gui_utf_decode(t + text_len, &unicode, l - text_len);
text_len += glyph_len; text_len += glyph_len;
} }
return MAX(0, text_width - text_width); return (l > 1) ? text_width : 0;
} }
static void static void