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

Closed
opened 2026-01-31 04:57:30 +00:00 by claunia · 5 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.
Author
Owner

@zadjii-msft commented on GitHub (Dec 9, 2021):

  1. lol
  2. that seems like a reasonable fix to me
@zadjii-msft commented on GitHub (Dec 9, 2021): 1. lol 2. that seems like a reasonable fix to me
Author
Owner

@DHowett commented on GitHub (Dec 9, 2021):

  1. LOL!
  2. I think the renderer (graphical renderer; the VT one can't do this...) should skip Concealed text entirely. After all... why try our hardest to put down matching pixels when we could just put down nothing at all?
@DHowett commented on GitHub (Dec 9, 2021): 1. LOL! 2. I think the renderer (graphical renderer; the VT one can't do this...) should skip Concealed text entirely. After all... why try our hardest to put down matching pixels when we could just put down nothing at all?
Author
Owner

@DHowett commented on GitHub (Dec 9, 2021):

(I say this in part because renderer support for transparent foregrounds is going to be spotty; we have never formally tested it! Atlas engine made an assumption about it as well.)

@DHowett commented on GitHub (Dec 9, 2021): (I say this in part because renderer support for transparent foregrounds is going to be spotty; we have never formally tested it! Atlas engine made an assumption about it as well.)
Author
Owner

@j4james commented on GitHub (Dec 9, 2021):

I think the renderer (graphical renderer; the VT one can't do this...) should skip Concealed text entirely.

I'm not opposed to that, but it does seem likely to be a lot more work for an attribute that's probably not used very often. If someone else is keen to take that on, though, I wouldn't object.

@j4james commented on GitHub (Dec 9, 2021): > I think the renderer (graphical renderer; the VT one can't do this...) should skip Concealed text entirely. I'm not opposed to that, but it does seem likely to be a lot more work for an attribute that's probably not used very often. If someone else is keen to take that on, though, I wouldn't object.
Author
Owner

@j4james commented on GitHub (Nov 9, 2023):

This was actually fixed in PR #12127. As proposed above, we now render the concealed text with an opaque version of the background color. For anyone that would prefer it to be completely transparent, that's tracked in issue #16271.

@j4james commented on GitHub (Nov 9, 2023): This was actually fixed in PR #12127. As proposed above, we now render the concealed text with an opaque version of the background color. For anyone that would prefer it to be completely transparent, that's tracked in issue #16271.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16096