1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

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
parent b0208f38f6
commit 2b2915656d

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();