mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +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:
parent
503aebaefc
commit
70c9cfddc5
Notes:
sideshowbarker
2024-07-19 01:02:15 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/70c9cfddc50
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue