mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibGfx: Use Font::pixel_size() instead of glyph_height() when painting
This gives us correct height metrics for both bitmap and scalable fonts.
This commit is contained in:
parent
ff951c89fe
commit
65629d26fe
2 changed files with 7 additions and 7 deletions
|
@ -28,7 +28,7 @@ IntRect TextLayout::bounding_rect(TextWrapping wrapping, int line_spacing) const
|
|||
}
|
||||
|
||||
IntRect bounding_rect = {
|
||||
0, 0, 0, static_cast<int>((lines.size() * (m_font->glyph_height() + line_spacing)) - line_spacing)
|
||||
0, 0, 0, static_cast<int>((lines.size() * (m_font->pixel_size() + line_spacing)) - line_spacing)
|
||||
};
|
||||
|
||||
for (auto& line : lines) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue