mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:27:35 +00:00
LibGfx: Add ScaledFont::scaled_with_size()
It's like ScaledFont::with_size(), except that it guarantees that the result is non-null and ScaledFont. (Smart pointers don't allow covariant return types, else we could just narrow down the return type of with_size() while still overriding the base method.) No behavior change.
This commit is contained in:
parent
bc21ed151e
commit
7d9294b9a4
2 changed files with 8 additions and 2 deletions
|
@ -69,6 +69,7 @@ public:
|
|||
virtual String qualified_name() const override { return MUST(String::formatted("{} {} {} {}", family(), presentation_size(), weight(), slope())); }
|
||||
virtual String human_readable_name() const override { return MUST(String::formatted("{} {} {}", family(), variant(), presentation_size())); }
|
||||
|
||||
virtual NonnullRefPtr<ScaledFont> scaled_with_size(float point_size) const;
|
||||
virtual RefPtr<Font> with_size(float point_size) const override;
|
||||
|
||||
virtual bool has_color_bitmaps() const override { return m_font->has_color_bitmaps(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue