mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibGfx: Introduce with_size method for Font
This commit is contained in:
parent
d910dd345e
commit
1cc8895e4b
5 changed files with 16 additions and 0 deletions
|
@ -123,6 +123,11 @@ u8 ScaledFont::glyph_fixed_width() const
|
|||
return glyph_metrics(glyph_id_for_code_point(' ')).advance_width;
|
||||
}
|
||||
|
||||
RefPtr<Font> ScaledFont::with_size(float point_size) const
|
||||
{
|
||||
return adopt_ref(*new Gfx::ScaledFont(*m_font, point_size, point_size));
|
||||
}
|
||||
|
||||
Gfx::FontPixelMetrics ScaledFont::pixel_metrics() const
|
||||
{
|
||||
return m_pixel_metrics;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue