1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

LibGfx: Remove code point parameter from Gfx::Font::Metrics

Everyone was asking for the glyph width of 'M' anyway. We can just make
that request implicit and simplify the API.
This commit is contained in:
Andreas Kling 2022-03-28 11:57:44 +02:00
parent b0955fd269
commit 2f7b6af87e
5 changed files with 9 additions and 9 deletions

View file

@ -372,12 +372,12 @@ Font const& Font::bold_variant() const
return *m_bold_variant;
}
FontMetrics Font::metrics(u32 code_point) const
FontMetrics Font::metrics() const
{
return FontMetrics {
.size = (float)presentation_size(),
.x_height = (float)x_height(),
.glyph_width = (float)glyph_width(code_point),
.glyph_width = (float)glyph_width('M'),
.glyph_spacing = (float)glyph_spacing(),
};
}