From bc27aa9b6f487f1e89967ba5ebe404208aaf0bdb Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Sat, 15 Aug 2020 10:30:42 -0400 Subject: [PATCH] LibGUI: Use matching family fonts for TextEditor ruler Fixes incorrect glyph sizes when drawing bold line counts. --- Libraries/LibGUI/TextEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibGUI/TextEditor.cpp b/Libraries/LibGUI/TextEditor.cpp index fd63e29815..eea4173891 100644 --- a/Libraries/LibGUI/TextEditor.cpp +++ b/Libraries/LibGUI/TextEditor.cpp @@ -412,7 +412,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 ? Gfx::Font::default_bold_font() : font(), + is_current_line && font().has_boldface() ? font().bold_family_font() : font(), Gfx::TextAlignment::TopRight, is_current_line ? palette().ruler_active_text() : palette().ruler_inactive_text()); }