1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

terminal/screen: perform bold->light conversion only on foreground

Bold glyphs always use light colors. However, this color conversion is
limited to the foreground color, so skip it for backgrounds.
This commit is contained in:
David Herrmann 2014-10-05 15:49:26 +02:00
parent 378c4eed02
commit 34dbefceb1

View File

@ -100,8 +100,8 @@ static uint32_t term_color_to_argb32(const term_color *color, const term_attr *a
case TERM_CCODE_BLACK ... TERM_CCODE_LIGHT_WHITE:
t = color->ccode - TERM_CCODE_BLACK;
/* bold causes light colors */
if (t < 8 && attr->bold)
/* bold causes light colors (only for foreground colors) */
if (t < 8 && attr->bold && color == &attr->fg)
t += 8;
r = palette[t * 3 + 0];