Browse Source

Terminal: Paint bold text with a bold font.

This was really straightforward since all the necessary pieces were
already in place. This patch just passes a bold font to draw_glyphs()
for buffer cells with the bold attribute set. :^)
Andreas Kling 6 years ago
parent
commit
f37c8f618b
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Applications/Terminal/Terminal.cpp

+ 5 - 1
Applications/Terminal/Terminal.cpp

@@ -1106,7 +1106,11 @@ void Terminal::paint_event(GPaintEvent& event)
             }
             if (ch == ' ')
                 continue;
-            painter.draw_glyph(character_rect.location(), ch, lookup_color(should_reverse_fill_for_cursor_or_selection ? attribute.background_color : attribute.foreground_color));
+            painter.draw_glyph(
+                character_rect.location(),
+                ch,
+                attribute.flags & Attribute::Bold ? Font::default_bold_fixed_width_font() : font(),
+                lookup_color(should_reverse_fill_for_cursor_or_selection ? attribute.background_color : attribute.foreground_color));
         }
     }