mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
text: kerning should respect text scale
This commit is contained in:
parent
e1c0e7d1d4
commit
605ac1189f
@ -1529,10 +1529,12 @@ assemble_row(TextAssembler::TextRow &row,
|
|||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glyph_scale *= properties->get_glyph_scale() * properties->get_text_scale();
|
||||||
|
|
||||||
// Add the kerning delta.
|
// Add the kerning delta.
|
||||||
if (text_kerning) {
|
if (text_kerning) {
|
||||||
if (prev_char != -1) {
|
if (prev_char != -1) {
|
||||||
xpos += font->get_kerning(prev_char, character);
|
xpos += font->get_kerning(prev_char, character) * glyph_scale;
|
||||||
}
|
}
|
||||||
prev_char = character;
|
prev_char = character;
|
||||||
}
|
}
|
||||||
@ -1543,7 +1545,6 @@ assemble_row(TextAssembler::TextRow &row,
|
|||||||
// ligatures.
|
// ligatures.
|
||||||
GlyphPlacement placement;
|
GlyphPlacement placement;
|
||||||
|
|
||||||
glyph_scale *= properties->get_glyph_scale() * properties->get_text_scale();
|
|
||||||
placement._glyph = NULL;
|
placement._glyph = NULL;
|
||||||
placement._scale = glyph_scale;
|
placement._scale = glyph_scale;
|
||||||
placement._xpos = xpos;
|
placement._xpos = xpos;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user