Faint (ESC[2m) should be configurable to render as light font weight #21281

Open
opened 2026-01-31 07:38:36 +00:00 by claunia · 0 comments
Owner

Originally created by @PhMajerus on GitHub (Feb 20, 2024).

Option to render faint text as light font weight instead of semitransparency

The ANSI/VT escape sequence ESC[1m can be used to render strong text. It can be rendered as a brighter color, or as a heavier font weight (bold), according to user's preference.
The ANSI/VT escape sequence ESC[2m is used for faint text. It is currently rendered as semi-transparent to make it less contrasted from the background color.
However, faint could also be implemented as a lighter font.

ITU T.416 describes them as the following:

  SGR 1   Bold or increased intensity
  SGR 2   Faint or decreased intensity
  SGR 22  Normal intensity (neither bold nor faint)

The Wikipedia article on ANSI escape code (https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters) even mentions that both bold and faint were originally intended to change the font weight, and have been implemented as brighter and darker/semitransparent colors because of PC hardware limitations.

Proposed technical implementation details

Considering that Aaron included Light and ExtraLight font weights in Cascadia, wouldn't it be nice to let it shine in the Terminal by providing an option to render faint as a lighter font weight instead of a transparency level?

This would work exactly like it does today for Strong/Bold:
image

A second option Faint text style in Text Formatting would let you select None, Light font, Semitransparent colors, or Light font with semitransparent colors as the preferred rendering for ESC[2m.

Originally created by @PhMajerus on GitHub (Feb 20, 2024). # Option to render faint text as light font weight instead of semitransparency The ANSI/VT escape sequence `ESC[1m` can be used to render strong text. It can be rendered as a brighter color, or as a heavier font weight (bold), according to user's preference. The ANSI/VT escape sequence `ESC[2m` is used for faint text. It is currently rendered as semi-transparent to make it less contrasted from the background color. However, faint could also be implemented as a lighter font. ITU T.416 describes them as the following: ``` SGR 1 Bold or increased intensity SGR 2 Faint or decreased intensity SGR 22 Normal intensity (neither bold nor faint) ``` The Wikipedia article on ANSI escape code (https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters) even mentions that both bold and faint were originally intended to change the font weight, and have been implemented as brighter and darker/semitransparent colors because of PC hardware limitations. # Proposed technical implementation details Considering that Aaron included Light and ExtraLight font weights in Cascadia, wouldn't it be nice to let it shine in the Terminal by providing an option to render `faint` as a lighter font weight instead of a transparency level? This would work exactly like it does today for Strong/Bold: ![image](https://github.com/microsoft/terminal/assets/25664275/4a755f28-cdfa-4016-af4f-8481aaaa243d) A second option `Faint text style` in Text Formatting would let you select `None`, `Light font`, `Semitransparent colors`, or `Light font with semitransparent colors` as the preferred rendering for `ESC[2m`.
claunia added the Issue-FeatureArea-RenderingNeeds-Tag-FixProduct-Terminal labels 2026-01-31 07:38:36 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21281