mirror of
https://github.com/RGBCube/serenity
synced 2025-07-04 09:07:34 +00:00
LibGfx: Always truncate glyph coordinates in Painter::draw_text_run()
This fixes an issue with glyphs jiggling 1px back and forth due to inconsistent rounding.
This commit is contained in:
parent
6e655b7f89
commit
d40167f7bb
1 changed files with 1 additions and 1 deletions
|
@ -2399,7 +2399,7 @@ void Painter::draw_text_run(FloatPoint const& baseline_start, Utf8View const& st
|
||||||
|
|
||||||
// FIXME: this is probably not the real space taken for complex emojis
|
// FIXME: this is probably not the real space taken for complex emojis
|
||||||
x += font.glyphs_horizontal_kerning(last_code_point, code_point);
|
x += font.glyphs_horizontal_kerning(last_code_point, code_point);
|
||||||
draw_glyph_or_emoji({ round_to<int>(x), y }, code_point_iterator, font, color);
|
draw_glyph_or_emoji({ static_cast<int>(x), y }, code_point_iterator, font, color);
|
||||||
x += font.glyph_or_emoji_width(code_point) + font.glyph_spacing();
|
x += font.glyph_or_emoji_width(code_point) + font.glyph_spacing();
|
||||||
last_code_point = code_point;
|
last_code_point = code_point;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue