1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 02:35:09 +00:00

LibGfx: Add Gfx::Font::bold_variant() that does a proper font lookup

We previously had a cached bold variant font in Gfx::Font that was very
haphazardly located by filename pattern. This patches replaces that
mechanism with a proper Gfx::FontDatabase lookup for the same font but
with bold weight (700).
This commit is contained in:
Andreas Kling 2020-12-31 01:49:05 +01:00
parent 0f66589007
commit 412a91d58f
4 changed files with 16 additions and 25 deletions

View file

@ -136,7 +136,7 @@ DirectoryView::DirectoryView(Mode mode)
setup_actions();
m_error_label = add<GUI::Label>();
m_error_label->set_font(m_error_label->font().bold_family_font());
m_error_label->set_font(m_error_label->font().bold_variant());
setup_model();