1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

LibGfx: Introduce with_size method for Font

This commit is contained in:
Aliaksandr Kalenik 2023-02-09 11:55:05 +03:00 committed by Linus Groh
parent d910dd345e
commit 1cc8895e4b
5 changed files with 16 additions and 0 deletions

View file

@ -381,6 +381,11 @@ DeprecatedString BitmapFont::variant() const
return builder.to_deprecated_string();
}
RefPtr<Font> BitmapFont::with_size(float point_size) const
{
return Gfx::FontDatabase::the().get(family(), point_size, weight(), width(), slope());
}
Font const& Font::bold_variant() const
{
if (m_bold_variant)