mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:58:13 +00:00
LibGfx: Make Font::preferred_line_height() more correct
Return a float, and fix a bogus calculation of ascender + descender.
This commit is contained in:
parent
43a10674d0
commit
2a61d66b0a
8 changed files with 10 additions and 10 deletions
|
@ -18,9 +18,9 @@ struct ScaledFontMetrics {
|
|||
float descender { 0 };
|
||||
float line_gap { 0 };
|
||||
|
||||
int height() const
|
||||
float height() const
|
||||
{
|
||||
return ascender - descender;
|
||||
return ascender + descender;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue