mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +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:
parent
43a10674d0
commit
2a61d66b0a
8 changed files with 10 additions and 10 deletions
|
@ -55,7 +55,7 @@ public:
|
|||
virtual float glyph_width(u32 code_point) const override;
|
||||
virtual float glyph_or_emoji_width(u32 code_point) const override;
|
||||
virtual float glyphs_horizontal_kerning(u32 left_code_point, u32 right_code_point) const override;
|
||||
virtual int preferred_line_height() const override { return metrics().height() + metrics().line_gap; }
|
||||
virtual float preferred_line_height() const override { return metrics().height() + metrics().line_gap; }
|
||||
virtual u8 glyph_height() const override { return m_point_height; }
|
||||
virtual int x_height() const override { return m_point_height; } // FIXME: Read from font
|
||||
virtual u8 min_glyph_width() const override { return 1; } // FIXME: Read from font
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue