bold works !!
This commit is contained in:
@@ -1092,7 +1092,8 @@ form span.required {
|
||||
|
||||
body.term #content {
|
||||
padding-left: 0;
|
||||
padding-right: 0; }
|
||||
padding-right: 0;
|
||||
transition: opacity 0.25s ease-in; }
|
||||
body.term #content h1 {
|
||||
font-size: 1.80203em; }
|
||||
@media screen and (max-width: 544px) {
|
||||
|
||||
@@ -9,6 +9,9 @@ body.term {
|
||||
font-size: fsize(3);
|
||||
}
|
||||
}
|
||||
|
||||
// longer duration to load everything in background nicely
|
||||
transition: opacity 0.25s ease-in;
|
||||
}
|
||||
|
||||
#screen {
|
||||
|
||||
@@ -222,16 +222,17 @@ apars_handle_CSI(char leadchar, int *params, char keychar)
|
||||
int n = params[i];
|
||||
|
||||
if (i == 0 && n == 0) { // reset SGR
|
||||
screen_reset_cursor();
|
||||
screen_reset_cursor(); // resets colors, inverse and bold.
|
||||
break; // cannot combine reset with others
|
||||
}
|
||||
else if (n >= 30 && n <= 37) screen_set_fg(n-30); // ANSI normal fg
|
||||
else if (n >= 40 && n <= 47) screen_set_bg(n-40); // ANSI normal bg
|
||||
else if (n == 39) screen_set_fg(7); // default fg
|
||||
else if (n == 49) screen_set_bg(0); // default bg
|
||||
else if (n == 7) screen_inverse(1); // inverse
|
||||
else if (n == 27) screen_inverse(0); // positive
|
||||
else if (n == 1) screen_set_bright_fg(); // ANSI bold = bright fg
|
||||
else if (n == 49) screen_set_bg(false); // default bg
|
||||
else if (n == 7) screen_inverse(true); // inverse
|
||||
else if (n == 27) screen_inverse(false); // positive
|
||||
else if (n == 1) screen_set_bold(true); // ANSI bold = bright fg
|
||||
else if (n == 21 || n == 22) screen_set_bold(false); // ANSI bold = bright fg
|
||||
else if (n >= 90 && n <= 97) screen_set_fg(n-90+8); // AIX bright fg
|
||||
else if (n >= 100 && n <= 107) screen_set_bg(n-100+8); // AIX bright bg
|
||||
}
|
||||
|
||||
+11
-2
@@ -116,6 +116,7 @@ clear_range(unsigned int from, unsigned int to)
|
||||
screen[i].c[3] = 0;
|
||||
screen[i].fg = fg;
|
||||
screen[i].bg = bg;
|
||||
screen[i].bold = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -502,11 +503,18 @@ screen_inverse(bool inverse)
|
||||
* This relates to the '1' SGR command which originally means
|
||||
* "bold font". We interpret that as "Bright", similar to other
|
||||
* terminal emulators.
|
||||
*
|
||||
* Note that the bright colors can be used without bold using the 90+ codes
|
||||
*/
|
||||
void ICACHE_FLASH_ATTR
|
||||
screen_set_bright_fg(void)
|
||||
screen_set_bold(bool bold)
|
||||
{
|
||||
cursor.fg = (Color) ((cursor.fg % 8) + 8);
|
||||
if (!bold) {
|
||||
cursor.fg = (Color) (cursor.fg % 8);
|
||||
} else {
|
||||
cursor.fg = (Color) ((cursor.fg % 8) + 8); // change anything to the bright colors
|
||||
}
|
||||
cursor.bold = bold;
|
||||
}
|
||||
|
||||
//endregion
|
||||
@@ -591,6 +599,7 @@ screen_putchar(const char *ch)
|
||||
c->fg = cursor.fg;
|
||||
c->bg = cursor.bg;
|
||||
}
|
||||
c->bold = cursor.bold;
|
||||
|
||||
cursor.x++;
|
||||
// X wrap
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ void screen_set_fg(Color color);
|
||||
void screen_set_bg(Color color);
|
||||
|
||||
/** make foreground bright */
|
||||
void screen_set_bright_fg(void);
|
||||
void screen_set_bold(bool bold);
|
||||
|
||||
/** Set cursor foreground and background color */
|
||||
void screen_set_colors(Color fg, Color bg);
|
||||
|
||||
Reference in New Issue
Block a user