1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

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

View file

@ -159,7 +159,7 @@ private:
static RefPtr<Font> load_from_memory(const u8*);
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();
RefPtr<Font> m_bold_family_font;