Introduce bold color option

Introduce "bold" color option which only apply bold color formatting to
existing system color.

Also make "bold" the default color option.

Fixes all white issue with black on white tio text.
This commit is contained in:
Martin Lund 2022-07-15 18:36:46 +02:00
parent 9db7bb4fbb
commit 9733bdf19c
6 changed files with 31 additions and 10 deletions

View file

@ -39,6 +39,14 @@ void print_normal(char c)
void print_init_ansi_formatting()
{
// Set bold text with user defined ANSI color
sprintf(ansi_format, "\e[1;38;5;%dm", option.color);
if (option.color == 256)
{
// Set bold text with no color changes
sprintf(ansi_format, "\e[1m");
}
else
{
// Set bold text with user defined ANSI color
sprintf(ansi_format, "\e[1;38;5;%dm", option.color);
}
}