mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:47:44 +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:
parent
95715f0c8f
commit
4dd9e2df78
5 changed files with 28 additions and 8 deletions
|
@ -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() {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue