|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 34dbefceb1377ccd7871e183d7791f76fe879e73 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: David Herrmann <dh.herrmann@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Sun, 5 Oct 2014 15:49:26 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] terminal/screen: perform bold->light conversion only on
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
foreground
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Bold glyphs always use light colors. However, this color conversion is
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
limited to the foreground color, so skip it for backgrounds.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/libsystemd-terminal/term-parser.c | 4 ++--
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/libsystemd-terminal/term-parser.c b/src/libsystemd-terminal/term-parser.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 8ec6345d60..d8206a46ba 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/libsystemd-terminal/term-parser.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/libsystemd-terminal/term-parser.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -100,8 +100,8 @@ static uint32_t term_color_to_argb32(const term_color *color, const term_attr *a
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
case TERM_CCODE_BLACK ... TERM_CCODE_LIGHT_WHITE:
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
t = color->ccode - TERM_CCODE_BLACK;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- /* bold causes light colors */
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- if (t < 8 && attr->bold)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ /* bold causes light colors (only for foreground colors) */
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ if (t < 8 && attr->bold && color == &attr->fg)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
t += 8;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
r = palette[t * 3 + 0];
|