1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47:35 +00:00

Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()

The only remaining clients of this API are specific to bitmap fonts and
editing thereof.
This commit is contained in:
Andreas Kling 2023-03-03 19:32:19 +01:00
parent 93c9344e35
commit b71c7a6e44
32 changed files with 63 additions and 65 deletions

View file

@ -78,7 +78,7 @@ CSSPixels Length::relative_length_to_px(CSSPixelRect const& viewport_rect, Gfx::
case Type::Em:
return m_value * font_size;
case Type::Ch:
// FIXME: Use layout_node.font().glyph_height() when writing-mode is not horizontal-tb (it has to be implemented first)
// FIXME: Use layout_node.font().pixel_size() when writing-mode is not horizontal-tb (it has to be implemented first)
return m_value * (font_metrics.advance_of_ascii_zero + font_metrics.glyph_spacing);
case Type::Rem:
return m_value * root_font_size;