LibGfx: Make draw_ui_text() underlines take glyph spacing into account

Without this, the underline was ending up too far to the left.
This commit is contained in:
Andreas Kling 2021-04-09 15:44:04 +02:00
commit eecf60767a
Notes: sideshowbarker 2024-07-18 20:37:35 +09:00

View file

@ -1846,7 +1846,7 @@ void Gfx::Painter::draw_ui_text(const Gfx::IntRect& rect, const StringView& text
draw_line({ x1, y }, { x2, y }, Color::Black);
break;
}
width += font.glyph_or_emoji_width(*it);
width += font.glyph_or_emoji_width(*it) + font.glyph_spacing();
}
}
}