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

LibGfx: Add Font::point_size()

This returns the font size in pt instead of px.
This commit is contained in:
Andreas Kling 2023-03-15 10:46:06 +01:00
parent db545b51ef
commit a4927f523b
4 changed files with 11 additions and 0 deletions

View file

@ -36,6 +36,7 @@ public:
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 const_cast<ScaledFont&>(*this); }
virtual u8 presentation_size() const override { return m_point_height; }
virtual float point_size() const override;
virtual float pixel_size() const override;
virtual int pixel_size_rounded_up() const override;
virtual Gfx::FontPixelMetrics pixel_metrics() const override;