microsoft / microsoft/terminal
Acrylic background doesn't work if foreground is invisible
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
Latest nightly
### Windows build number
10.0.19045.3448
### Other Software
_No response_
### Steps to reproduce
1. Enable background transparency and acrylic material in settings.
2. Run the script below:
```
@echo off
echo [1m bold[m
echo [2m faint[m
echo [3m italic[m
echo [4m underline[m
echo [9m strikeout[m
echo [53m overline[m
echo [5m blink[m
echo [7m inverse[m
echo [8m invisible[m
pause
```
\- where is \x1b
### Expected Behavior

### Actual Behavior

\- "Invisible" foreground causes the background to be fully opaque.
Looking at the code, it seems to be here:
https://github.com/microsoft/terminal/blob/9e86c9811f2cf0ad53c9c543b886274b1079dd00/src/renderer/base/RenderSettings.cpp#L205-L207
The ` || attr.IsInvisible()` bit was added here:
https://github.com/microsoft/terminal/pull/12127/files#diff-0f336e9fd3608b43380ed0ad16fc625c4f1e2a681c70fc627f9df7239e1b6d54R252-R253
Looks like it wasn't in the original code:
https://github.com/microsoft/terminal/pull/12127/files#diff-f9112caf8cb75e7a48a7b84987724d754181227385fbfcc2cc09a879b1f97c12L90-L91
The change wasn't reflected in the comment / mentioned elsewhere in the PR (or at least I can't find it), so, is it intentional / a bug?
Contributor guide
Research direction
Start in src/renderer/base/RenderSettings.cpp around lines 205-207 and compare the linked history for the IsInvisible() change. Reproduce the batch script with acrylic transparency enabled, then verify that invisible foreground text no longer makes the background fully opaque and that the behavior matches the expected image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100