LibGfx: Remove bogus baseline adjustment in Painter's draw_text_line()

This didn't achieve anything other than a slight vertical misalignment
for scalable fonts.
This commit is contained in:
Andreas Kling 2022-03-27 01:09:18 +01:00
commit 2b2915656d
Notes: sideshowbarker 2024-07-17 16:42:02 +09:00

View file

@ -1365,11 +1365,6 @@ void draw_text_line(IntRect const& a_rect, Utf8View const& text, Font const& fon
VERIFY_NOT_REACHED();
}
if (is_vertically_centered_text_alignment(alignment)) {
int distance_from_baseline_to_bottom = (font.pixel_size() - 1) - font.baseline();
rect.translate_by(0, distance_from_baseline_to_bottom / 2);
}
auto point = rect.location();
int space_width = font.glyph_width(' ') + font.glyph_spacing();