Fix T38325: Game Engine Bitmap fonts failed for characters >128
This commit is contained in:
parent
c700103eab
commit
2f46ed5564
Notes:
blender-bot
2023-02-14 11:18:07 +01:00
Referenced by issue #38325, Fontmap displaying unicode characters above 128 incorrectly.
|
@ -96,7 +96,8 @@ void GPU_render_text(MTFace *tface, int mode,
|
|||
if ((mode & GEMAT_TEXT) && (textlen>0) && tface->tpage) {
|
||||
Image* ima = (Image *)tface->tpage;
|
||||
ImBuf *first_ibuf;
|
||||
int index, character;
|
||||
const size_t textlen_st = textlen;
|
||||
size_t index, character;
|
||||
float centerx, centery, sizex, sizey, transx, transy, movex, movey, advance;
|
||||
float advance_tab;
|
||||
|
||||
|
@ -127,11 +128,11 @@ void GPU_render_text(MTFace *tface, int mode,
|
|||
advance_tab= advance * 4; /* tab width could also be an option */
|
||||
|
||||
|
||||
for (index = 0; index < textlen; index++) {
|
||||
for (index = 0; index < textlen_st; ) {
|
||||
float uv[4][2];
|
||||
|
||||
// lets calculate offset stuff
|
||||
character = textstr[index];
|
||||
character = BLI_str_utf8_as_unicode_and_size_safe(textstr + index, &index);
|
||||
|
||||
if (character=='\n') {
|
||||
glTranslatef(line_start, -line_height, 0.0);
|
||||
|
|
Loading…
Reference in New Issue