1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:47:35 +00:00

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. :^)
This commit is contained in:
Andreas Kling 2019-08-04 08:15:30 +02:00
parent 7d08116a6d
commit f37c8f618b

View file

@ -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));
}
}