1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +00:00

LibGfx: Add pure virtual fallible clone() for Fonts

This commit is contained in:
thankyouverycool 2022-08-15 06:26:56 -04:00 committed by Andreas Kling
parent d9fb838cf6
commit 1be830e3c6
3 changed files with 4 additions and 2 deletions

View file

@ -33,7 +33,8 @@ public:
RefPtr<Gfx::Bitmap> rasterize_glyph(u32 glyph_id) const;
// ^Gfx::Font
virtual NonnullRefPtr<Font> clone() const override { return *this; } // FIXME: clone() should not need to be implemented
virtual NonnullRefPtr<Font> clone() const override { return MUST(try_clone()); } // FIXME: clone() should not need to be implemented
virtual ErrorOr<NonnullRefPtr<Font>> try_clone() const override { return *this; }
virtual u8 presentation_size() const override { return m_point_height; }
virtual int pixel_size() const override { return m_point_height * 1.33333333f; }
virtual float point_size() const override { return m_point_height; }