Show bold text in bright colors

Fixes 17. Could be made an option in the future if necessary.
This commit is contained in:
Fredrik Fornwall
2015-11-24 17:31:48 +01:00
parent b1aaf5abe5
commit 36cc010a87

View File

@@ -205,7 +205,10 @@ final class TerminalRenderer {
final boolean strikeThrough = (effect & TextStyle.CHARACTER_ATTRIBUTE_STRIKETHROUGH) != 0;
final boolean dim = (effect & TextStyle.CHARACTER_ATTRIBUTE_DIM) != 0;
int foreColorARGB = palette[foreColor];
// Let bold have bright colors if applicable (one of the first 8):
final int actualForeColor = foreColor + (bold && foreColor < 8 ? 8 : 0);
int foreColorARGB = palette[actualForeColor];
if (dim) {
int red = (0xFF & (foreColorARGB >> 16));
int green = (0xFF & (foreColorARGB >> 8));