From 70c9cfddc50b3a9ecf9f0ef2f0d8574d9437a04e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 6 Dec 2020 01:00:45 +0100 Subject: [PATCH] LibGfx: Fix font x-height computation Line indices start from the top, so the baseline is a higher number than the mean line. :^) --- Libraries/LibGfx/Font.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibGfx/Font.h b/Libraries/LibGfx/Font.h index 7e7069ed49..1c6f68d8e8 100644 --- a/Libraries/LibGfx/Font.h +++ b/Libraries/LibGfx/Font.h @@ -159,7 +159,7 @@ private: static RefPtr 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 m_bold_family_font;