mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:37:35 +00:00
LibGfx+Utilities: Add helpers to load vector fonts from Core::Resources
This commit is contained in:
parent
286dc6df7f
commit
86ce502ae2
8 changed files with 19 additions and 21 deletions
|
@ -21,7 +21,7 @@ class Font : public Gfx::VectorFont {
|
|||
AK_MAKE_NONCOPYABLE(Font);
|
||||
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<Font>> try_load_from_file(DeprecatedString path, unsigned index = 0);
|
||||
static ErrorOr<NonnullRefPtr<Font>> try_load_from_resource(Core::Resource const&, unsigned index = 0);
|
||||
static ErrorOr<NonnullRefPtr<Font>> try_load_from_externally_owned_memory(ReadonlyBytes bytes, unsigned index = 0);
|
||||
|
||||
virtual Gfx::ScaledFontMetrics metrics(float x_scale, float y_scale) const override { return m_input_font->metrics(x_scale, y_scale); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue