|
@@ -81,11 +81,20 @@ private:
|
|
|
int m_ascent;
|
|
|
};
|
|
|
|
|
|
+struct FontMetrics {
|
|
|
+ float size { 0 };
|
|
|
+ float x_height { 0 };
|
|
|
+ float glyph_width { 0 };
|
|
|
+ float glyph_spacing { 0 };
|
|
|
+};
|
|
|
+
|
|
|
class Font : public RefCounted<Font> {
|
|
|
public:
|
|
|
virtual NonnullRefPtr<Font> clone() const = 0;
|
|
|
virtual ~Font() {};
|
|
|
|
|
|
+ FontMetrics metrics(u32 code_point) const;
|
|
|
+
|
|
|
virtual u8 presentation_size() const = 0;
|
|
|
|
|
|
virtual u16 weight() const = 0;
|