mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:27:35 +00:00
LibGUI+LibGfx: Defer to fonts when setting Editor line height
Fonts now provide their preferred line height based on maximum height and requested line gap. TTFs provide a preferred line gap from table metrics while BitmapFonts are hardcoded at the previous default for now.
This commit is contained in:
parent
07910c12e3
commit
d94db1900e
5 changed files with 7 additions and 5 deletions
|
@ -53,6 +53,7 @@ public:
|
|||
}
|
||||
u8 glyph_height() const override { return m_glyph_height; }
|
||||
int x_height() const override { return m_x_height; }
|
||||
int preferred_line_height() const override { return glyph_height() + m_line_gap; }
|
||||
|
||||
u8 glyph_width(u32 code_point) const override;
|
||||
u8 raw_glyph_width(u32 code_point) const { return m_glyph_widths[code_point]; }
|
||||
|
@ -143,6 +144,7 @@ private:
|
|||
u8 m_presentation_size { 0 };
|
||||
u16 m_weight { 0 };
|
||||
u8 m_slope { 0 };
|
||||
u8 m_line_gap { 4 };
|
||||
|
||||
bool m_fixed_width { false };
|
||||
bool m_owns_arrays { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue