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

LibGfx: Add FontDatabase::get(family, size, weight)

This function allows you to look up a font by its exact parameters.
This commit is contained in:
Andreas Kling 2020-12-28 15:47:21 +01:00
parent cd9ad6a05e
commit 105eb8e1bc
2 changed files with 11 additions and 0 deletions

View file

@ -37,6 +37,7 @@ class FontDatabase {
public:
static FontDatabase& the();
RefPtr<Gfx::Font> get(const String& family, unsigned size, unsigned weight);
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&)>);