KazDragon / terminalpp

A C++ library for interacting with ANSI terminal windows.
MIT License
75 stars 10 forks source link

A faint colour followed by a bold colour doesn't become bright #306

Closed KazDragon closed 8 months ago

KazDragon commented 8 months ago

This was discovered while investigating an issue in Textray where odd shadows were being cast across the middle of the screen following distant objects that were painted as faint.

After some investigation, I determined that this is not a bug in Terminal++ per se, but rather the consequences of a decision taken in certain terminals to treat bold and faint (SGR 1 and SGR 2) as not being mutually exclusive, and so you end up with the bold element being both faint and bold due to attribute carry-over.

A workaround for this is to intersperse with a normal intensity (SGR 22) when transitioning between the two.