SGR 8 doesn't work when acrylic is enabled #16093

Open
opened 2026-01-31 04:57:22 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Dec 9, 2021).

Windows Terminal version

1.12.2931.0

Windows build number

10.0.19041.1348

Other Software

No response

Steps to reproduce

  1. In the Setting UI, go to the Profiles Defaults page and select the Appearance tab.
  2. Make sure the option Automaticaly adjust lightness of indistinguishable text is disabled (see #11917).
  3. Make sure the Enable acrylic option is on.
  4. Set the Background opacity slider to 50%.
  5. Open a bash shell.
  6. Execute the following command: printf "\e[8m CONCEALED \e[m\n"
  7. Move the terminal window over something that is white/bright in color.

Expected Behavior

I'd expect the text to be completely invisible.

Actual Behavior

The text is quite clearly visible.

image

An easy fix for this might be to include an additional attr.IsInvisible() test in the condition here:
bb71179a24/src/cascadia/TerminalCore/terminalrenderdata.cpp (L94-L99)

The concealed text wouldn't show as transparent, but would instead appear as an opaque version of the background color, as if it had been blacked out by a censor. That seems like a reasonable rendition I think.

Originally created by @j4james on GitHub (Dec 9, 2021). ### Windows Terminal version 1.12.2931.0 ### Windows build number 10.0.19041.1348 ### Other Software _No response_ ### Steps to reproduce 1. In the Setting UI, go to the _Profiles Defaults_ page and select the _Appearance_ tab. 2. Make sure the option _Automaticaly adjust lightness of indistinguishable text_ is **disabled** (see #11917). 3. Make sure the _Enable acrylic_ option is **on**. 4. Set the _Background opacity_ slider to 50%. 5. Open a bash shell. 6. Execute the following command: `printf "\e[8m CONCEALED \e[m\n"` 7. Move the terminal window over something that is white/bright in color. ### Expected Behavior I'd expect the text to be completely invisible. ### Actual Behavior The text is quite clearly visible. ![image](https://user-images.githubusercontent.com/4181424/145473790-48352c1d-7652-4c3b-b4ba-5bc73c7b286f.png) An easy fix for this might be to include an additional `attr.IsInvisible()` test in the condition here: https://github.com/microsoft/terminal/blob/bb71179a24ff186eab999676732afff8a345cc12/src/cascadia/TerminalCore/terminalrenderdata.cpp#L94-L99 The concealed text wouldn't show as transparent, but would instead appear as an opaque version of the background color, as if it had been blacked out by a censor. That seems like a reasonable rendition I think.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16093