LibGfx: Fix font x-height computation

Line indices start from the top, so the baseline is a higher number
than the mean line. :^)
This commit is contained in:
Andreas Kling 2020-12-06 01:00:45 +01:00
parent 503aebaefc
commit 70c9cfddc5
Notes: sideshowbarker 2024-07-19 01:02:15 +09:00

View file

@ -159,7 +159,7 @@ private:
static RefPtr<Font> load_from_memory(const u8*); static RefPtr<Font> load_from_memory(const u8*);
static size_t glyph_count_by_type(FontTypes type); static size_t glyph_count_by_type(FontTypes type);
void update_x_height() { m_x_height = m_mean_line - m_baseline; }; void update_x_height() { m_x_height = m_baseline - m_mean_line; };
void set_family_fonts(); void set_family_fonts();
RefPtr<Font> m_bold_family_font; RefPtr<Font> m_bold_family_font;