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

LibGfx: Make Font::preferred_line_height() more correct

Return a float, and fix a bogus calculation of ascender + descender.
This commit is contained in:
Andreas Kling 2023-01-05 17:13:55 +01:00
parent 43a10674d0
commit 2a61d66b0a
8 changed files with 10 additions and 10 deletions

View file

@ -69,7 +69,7 @@ public:
float glyphs_horizontal_kerning(u32, u32) const override { return 0.f; }
u8 glyph_height() const override { return m_glyph_height; }
int x_height() const override { return m_x_height; }
int preferred_line_height() const override { return glyph_height() + m_line_gap; }
virtual float preferred_line_height() const override { return glyph_height() + m_line_gap; }
virtual float glyph_width(u32 code_point) const override;
u8 raw_glyph_width(u32 code_point) const { return m_glyph_widths[code_point]; }