mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +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:
@@ -427,7 +427,7 @@ void TextEditor::paint_event(PaintEvent& event)
|
||||
painter.draw_text(
|
||||
ruler_line_rect.shrunken(2, 0).translated(0, m_line_spacing / 2),
|
||||
String::number(i + 1),
|
||||
is_current_line && font().has_boldface() ? font().bold_family_font() : font(),
|
||||
is_current_line ? font().bold_variant() : font(),
|
||||
Gfx::TextAlignment::TopRight,
|
||||
is_current_line ? palette().ruler_active_text() : palette().ruler_inactive_text());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user