microsoft / microsoft/terminal

Foreground and background are inverted for certain characters

Open
#18,249 8 comments 0 reactions 0 assignees View on GitHub
Area-Rendering Issue-Bug Needs-Repro Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.22.3232.0

### Windows build number

10.0.22631.0

### Other Software

_No response_

### Steps to reproduce

The *Black Large Circle* ⬤ (`0x2b24`) has inverted colors, e.g. printing both *Black Circle* ● (`0x25cf`) and the large version in red via PowerShell:

```pwsh
echo "$([char]0x001b)[31m●⬤$([char]0x001b)[0m"
```

(The explicit coloring is not necessary to show this, though my use case requires the color to indicate various statuses.)

### Expected Behavior

In both cases the circle is red.

### Actual Behavior

Only for the small circle is red, for the larger one, the background becomes red instead:

![screenshot showing inversion](https://github.com/user-attachments/assets/18273490-2eb0-46d0-8dcc-f64f1b951f6c)

VS Code seems to do this as well in the editor 🤔
![screenshot showing inversion in VS code text file](https://github.com/user-attachments/assets/a142c610-7482-46c3-9fee-da277174e0cd)

...but its terminal does not
![screenshot showing no inversion in VS Code terminal](https://github.com/user-attachments/assets/0c933aad-f62d-45e0-80c9-9c201ef27b49)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in Windows Terminal 1.22.3232.0 with the provided PowerShell command, comparing U+25CF and U+2B24 under the ANSI red foreground sequence. Investigate the terminal's character rendering and color handling; done means both circles render with red foreground color and no red background.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.