mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
fix incorrect width calculation with missing characters in font
This commit is contained in:
parent
0f8ef38cc9
commit
c37acce234
@ -1026,7 +1026,8 @@ measure_row(wstring::iterator &si, const wstring::iterator &send,
|
|||||||
|
|
||||||
const TextGlyph *glyph;
|
const TextGlyph *glyph;
|
||||||
float glyph_scale;
|
float glyph_scale;
|
||||||
if (font->get_glyph(character, glyph, glyph_scale)) {
|
font->get_glyph(character, glyph, glyph_scale);
|
||||||
|
if (glyph != (TextGlyph *)NULL) {
|
||||||
xpos += glyph->get_advance() * glyph_scale;
|
xpos += glyph->get_advance() * glyph_scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user