1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:47:44 +00:00

LibGfx: Improve tie-breaking in Typeface::get_font

Add two new members to Font::AllowInexactMatch: Larger and Smaller.
This allows callers of FontDatabase::get to specify if they want to
prefer a larger or smaller font in the event of a tie.
This commit is contained in:
Shane Murphy 2023-10-18 21:55:47 -07:00 committed by Andreas Kling
parent 1915e603c9
commit 0e05614710
2 changed files with 11 additions and 3 deletions

View file

@ -148,6 +148,8 @@ public:
enum class AllowInexactSizeMatch {
No,
Yes,
Larger,
Smaller,
};
virtual NonnullRefPtr<Font> clone() const = 0;