Terminal: Implement dumb font bolding
This is just drawing character twice at one pixel offset
This commit is contained in:
parent
f959905adf
commit
57f6f50939
|
@ -338,9 +338,10 @@ void Terminal::handle_sgr(int32_t value)
|
|||
m_bg_color = s_default_bg_color;
|
||||
m_fg_color = s_default_fg_color;
|
||||
m_colors_inverted = false;
|
||||
m_is_bold = false;
|
||||
break;
|
||||
case 1:
|
||||
// FIXME: bold
|
||||
m_is_bold = true;
|
||||
break;
|
||||
case 7:
|
||||
m_colors_inverted = true;
|
||||
|
@ -694,6 +695,8 @@ Rectangle Terminal::putcodepoint(uint32_t codepoint)
|
|||
|
||||
texture.fill_rect(cell_x, cell_y, cell_w, cell_h, bg_color);
|
||||
texture.draw_character(codepoint, m_font, cell_x, cell_y, fg_color);
|
||||
if (m_is_bold)
|
||||
texture.draw_character(codepoint, m_font, cell_x + 1, cell_y, fg_color);
|
||||
m_last_graphic_char = codepoint;
|
||||
should_invalidate = { cell_x, cell_y, cell_w, cell_h };
|
||||
m_cursor.x++;
|
||||
|
|
|
@ -102,4 +102,5 @@ private:
|
|||
uint32_t m_fg_color { 0 };
|
||||
uint32_t m_bg_color { 0 };
|
||||
bool m_colors_inverted { false };
|
||||
bool m_is_bold { false };
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue