summaryrefslogtreecommitdiff
path: root/Libraries/LibGfx/Font.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-06 01:00:45 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-06 01:01:15 +0100
commit70c9cfddc50b3a9ecf9f0ef2f0d8574d9437a04e (patch)
tree54f5ecf4674f260982bbfe14cac56d4f78ba8b31 /Libraries/LibGfx/Font.h
parent503aebaefc7fbda98c3411b927f3c2bea56170aa (diff)
downloadserenity-70c9cfddc50b3a9ecf9f0ef2f0d8574d9437a04e.zip
LibGfx: Fix font x-height computation
Line indices start from the top, so the baseline is a higher number than the mean line. :^)
Diffstat (limited to 'Libraries/LibGfx/Font.h')
-rw-r--r--Libraries/LibGfx/Font.h2
1 files changed, 1 insertions, 1 deletions
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<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;