1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

LibGUI: Account for glyph_spacing() in spans

This commit is contained in:
Cameron Youell 2023-02-16 18:21:45 +11:00 committed by Sam Atkins
parent 32a01a60e7
commit dad70d8d6e

View file

@ -572,7 +572,7 @@ void TextEditor::paint_event(PaintEvent& event)
if (length == 0)
return;
auto text = visual_line_text.substring_view(start, length);
span_rect.set_width(font->width(text));
span_rect.set_width(font->width(text) + font->glyph_spacing());
if (text_attributes.background_color.has_value()) {
painter.fill_rect(span_rect, text_attributes.background_color.value());
}