Skip to content

Commit

Permalink
Show bold text in bright colors
Browse files Browse the repository at this point in the history
Fixes 17. Could be made an option in the future if necessary.
  • Loading branch information
fornwall committed Nov 24, 2015
1 parent b1aaf5a commit 36cc010
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/com/termux/view/TerminalRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ private void drawTextRun(Canvas canvas, char[] text, int[] palette, float y, int
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));
Expand Down

0 comments on commit 36cc010

Please sign in to comment.