1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 07:07:34 +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:
Andreas Kling 2022-03-27 00:55:08 +01:00
parent ff951c89fe
commit 65629d26fe
2 changed files with 7 additions and 7 deletions

View file

@ -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) {