summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-04 08:15:30 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-04 08:15:30 +0200
commitf37c8f618b33b07e0163638db52c4130b21a5dd2 (patch)
treeca4452d9bb41fa62ee3fb575dabefec81c12ddba /Applications
parent7d08116a6dd42b5d934ffab90a1d42507f136fee (diff)
downloadserenity-f37c8f618b33b07e0163638db52c4130b21a5dd2.zip
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. :^)
Diffstat (limited to 'Applications')
-rw-r--r--Applications/Terminal/Terminal.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Applications/Terminal/Terminal.cpp b/Applications/Terminal/Terminal.cpp
index 41bb8b980f..ba83a1e7c7 100644
--- a/Applications/Terminal/Terminal.cpp
+++ b/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));
}
}