diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-25 13:30:08 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-25 19:38:31 +0100 |
commit | 4dd9e2df7846ab3a5656b78665d3806c31985653 (patch) | |
tree | 5814f7d79d439ad30dba25067b32b3c44bc07e23 /Userland/Libraries/LibGfx/Font.h | |
parent | 95715f0c8f066b2bb43b9dbb4dec993bb627fd9f (diff) | |
download | serenity-4dd9e2df7846ab3a5656b78665d3806c31985653.zip |
LibGfx: Add Font::AllowInexactSizeMatch parameter to font lookup
This allows bitmap font lookup to return the best matching size instead
of failing completely. The previous behavior (exact matches only)
remains the default.
Diffstat (limited to 'Userland/Libraries/LibGfx/Font.h')
-rw-r--r-- | Userland/Libraries/LibGfx/Font.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/Font.h b/Userland/Libraries/LibGfx/Font.h index e9264de823..441e9dbad9 100644 --- a/Userland/Libraries/LibGfx/Font.h +++ b/Userland/Libraries/LibGfx/Font.h @@ -95,6 +95,11 @@ struct FontMetrics { class Font : public RefCounted<Font> { public: + enum class AllowInexactSizeMatch { + No, + Yes, + }; + virtual NonnullRefPtr<Font> clone() const = 0; virtual ~Font() {}; |