diff options
author | Andreas Kling <kling@serenityos.org> | 2023-01-05 18:51:34 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-06 12:02:20 +0100 |
commit | 65c8cd37e3188f85ea5a76e19502c3a27599ac40 (patch) | |
tree | 062b839b076c29b898ed60d81c8128199f8075ce /Userland/Libraries | |
parent | cddcf531b16e71ed5d627c450ae9e63f865a50c5 (diff) | |
download | serenity-65c8cd37e3188f85ea5a76e19502c3a27599ac40.zip |
LibGfx: Make ScaledFont::glyph_height() return the pixel height
This was returning the point height which didn't match BitmapFont and
led to bogus line heights in GUI::TextEditor.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibGfx/Font/ScaledFont.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/Font/ScaledFont.h b/Userland/Libraries/LibGfx/Font/ScaledFont.h index 6644ce3ea2..3cc5705e25 100644 --- a/Userland/Libraries/LibGfx/Font/ScaledFont.h +++ b/Userland/Libraries/LibGfx/Font/ScaledFont.h @@ -55,7 +55,7 @@ public: 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 float preferred_line_height() const override { return metrics().height() + metrics().line_gap; } - virtual u8 glyph_height() const override { return m_point_height; } + virtual u8 glyph_height() const override { return pixel_size(); } 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 virtual u8 max_glyph_width() const override { return m_point_width; } // FIXME: Read from font |