text: kerning should respect text scale

This commit is contained in:
rdb 2017-03-28 21:13:03 +02:00
parent e1c0e7d1d4
commit 605ac1189f

View File

@ -1529,10 +1529,12 @@ assemble_row(TextAssembler::TextRow &row,
<< "\n";
}
glyph_scale *= properties->get_glyph_scale() * properties->get_text_scale();
// Add the kerning delta.
if (text_kerning) {
if (prev_char != -1) {
xpos += font->get_kerning(prev_char, character);
xpos += font->get_kerning(prev_char, character) * glyph_scale;
}
prev_char = character;
}
@ -1543,7 +1545,6 @@ assemble_row(TextAssembler::TextRow &row,
// ligatures.
GlyphPlacement placement;
glyph_scale *= properties->get_glyph_scale() * properties->get_text_scale();
placement._glyph = NULL;
placement._scale = glyph_scale;
placement._xpos = xpos;