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

LibWeb: Improve fallback font selection

Try to find a font that has at least some of the requested properties.
This makes e.g. rfcs on tools.ietf.org easier to read since their
headers are now bold.
This commit is contained in:
Simon Danner 2021-04-22 20:47:47 +02:00 committed by GitHub
parent 7ab8be9e0b
commit c8d56ee4f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 3 deletions

View file

@ -76,6 +76,7 @@ private:
Optional<CSS::Overflow> overflow(CSS::PropertyID) const;
void load_font() const;
RefPtr<Gfx::Font> font_fallback(bool monospace, bool bold) const;
mutable RefPtr<Gfx::Font> m_font;
};