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

LibTTF: Add option to load font from a byte buffer

This commit is contained in:
Luke 2021-01-01 20:30:59 +00:00 committed by Andreas Kling
parent 84c2be604a
commit ad243ef3aa
2 changed files with 7 additions and 1 deletions

View file

@ -65,6 +65,7 @@ class Font : public RefCounted<Font> {
public:
static RefPtr<Font> load_from_file(const StringView& path, unsigned index = 0);
static RefPtr<Font> load_from_memory(ByteBuffer&, unsigned index = 0);
ScaledFontMetrics metrics(float x_scale, float y_scale) const;
ScaledGlyphMetrics glyph_metrics(u32 glyph_id, float x_scale, float y_scale) const;