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

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.
This commit is contained in:
Andreas Kling 2022-02-25 13:30:08 +01:00
parent 95715f0c8f
commit 4dd9e2df78
5 changed files with 28 additions and 8 deletions

View file

@ -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() {};