-
Notifications
You must be signed in to change notification settings - Fork 9k
Render SGR 1 as bold when used with ITU colors #18903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
DHowett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the architecture you built yourself, you make this look easy.
Thanks for doing this. I know bold/intense/the true definition of SGR 1 is contentious, so let's see how this one goes over. 🙂
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Yeah, I don't think this is likely to be a problem, because it doesn't have the history of ambiguity that I did consider maybe using the existing None option to disable it, but it's possible someone still wants bright with ANSI colors, but no bold on ITU colors, so that would require a completely separate toggle. So for now I figured it was best to keep it simple and see what happens. |
The `SGR 1` VT attribute can either be interpreted as a brighter color, or as a bolder font, depending on the _Intense text style_ setting. However, the concept of brightness only applies to the eight standard ANSI colors, so when `SGR 1` is configured as _bright_, it has no effect on the ITU T.416 colors (RGB and the 256 index colors). To address that, we now interpret `SGR 1` as a bolder font when applied to ITU colors, regardless of whether the _Intense text style_ option is set to bold or not. Note that this only applies to the Atlas render engine, since the GDI engine doesn't support bold fonts. ## Validation Steps Performed I've manually tested `SGR 1` applied to different color formats with the _Intense text style_ option set to _None_, and confirmed that the text is now rendered with a bold font for ITU colors, but not for ANSI/AIX colors. Closes #18284 (cherry picked from commit 07c9a99) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaWKqk Service-Version: 1.23
|
But why would vim use SGR 1 with an ITU color in the first place? Brightening an ITU color doesn't make much sense to me... Shouldn't this perhaps get fixed in vim / your vim plugin? |
|
It's apparently an issue in Vim's built-in terminal which is used by fzf. |
|
Posting this since this could help others: I found a temporary workaround by disabling the emission of the |

Summary of the Pull Request
The
SGR 1VT attribute can either be interpreted as a brighter color,or as a bolder font, depending on the Intense text style setting.
However, the concept of brightness only applies to the eight standard
ANSI colors, so when
SGR 1is configured as bright, it has no effecton the ITU T.416 colors (RGB and the 256 index colors).
To address that, we now interpret
SGR 1as a bolder font when appliedto ITU colors, regardless of whether the Intense text style option is
set to bold or not.
Note that this only applies to the Atlas render engine, since the GDI
engine doesn't support bold fonts.
Validation Steps Performed
I've manually tested
SGR 1applied to different color formats with theIntense text style option set to None, and confirmed that the text
is now rendered with a bold font for ITU colors, but not for ANSI/AIX
colors.
PR Checklist