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:
parent
b0955fd269
commit
2f7b6af87e
5 changed files with 9 additions and 9 deletions
|
@ -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(),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue