diff options
author | Stephan Unverwerth <s.unverwerth@gmx.de> | 2021-01-02 18:20:10 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-15 08:50:48 +0100 |
commit | 5a70ccecb3bc7a03155f93dff1af59abdee87bbc (patch) | |
tree | 1c01cdd3e21450fd7309759a8d885e97b15fb384 /Userland/Libraries/LibGfx/FontDatabase.h | |
parent | e504d4ef96742ec81fe69a231cdde0f3ff896196 (diff) | |
download | serenity-5a70ccecb3bc7a03155f93dff1af59abdee87bbc.zip |
LibGfx: Add more query methods to FontDatabase and Typeface
Diffstat (limited to 'Userland/Libraries/LibGfx/FontDatabase.h')
-rw-r--r-- | Userland/Libraries/LibGfx/FontDatabase.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/FontDatabase.h b/Userland/Libraries/LibGfx/FontDatabase.h index 204ab8e18b..4fb77b1d49 100644 --- a/Userland/Libraries/LibGfx/FontDatabase.h +++ b/Userland/Libraries/LibGfx/FontDatabase.h @@ -45,16 +45,19 @@ public: static Font& default_bold_fixed_width_font(); RefPtr<Gfx::Font> get(const String& family, unsigned size, unsigned weight); + RefPtr<Gfx::Font> get(const String& family, const String& variant, unsigned size); RefPtr<Gfx::Font> get_by_name(const StringView&); void for_each_font(Function<void(const Gfx::Font&)>); void for_each_fixed_width_font(Function<void(const Gfx::Font&)>); - RefPtr<Typeface> get_or_create_typeface(const String& family, const String& variant); + void for_each_typeface(Function<void(const Typeface&)>); private: FontDatabase(); ~FontDatabase(); + RefPtr<Typeface> get_or_create_typeface(const String& family, const String& variant); + struct Private; OwnPtr<Private> m_private; }; |