microsoft / microsoft/terminal
“ⓒ" U+24D2 fallback rendering in conhost / GDI
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version (or Windows build number)
OpenConsole built from the latest source or taken from the latest Terminal Preview, e.g. 1.10.2107.12003
### Other Software
_No response_
### Steps to reproduce
1. Create the following file:
```cmd
@echo off
chcp 65001
echo ⓒ
echo ⁺ⓒ
```
2. Save as `test.cmd` in UTF-8 encoding (or download [test.cmd.txt](https://github.com/microsoft/terminal/files/6975762/test.cmd.txt) and rename).
3. Build and run the latest OpenConsole.
4. Set the font to Consolas.
3. Run `test.cmd`.
### Expected Behavior

### Actual Behavior

### Details
It looks like the GDI renderer is having issues with the font fallback for the `ⓒ - Circled Latin Small Letter C: U+24D2` character.
Usually it doesn't work at all and the replacement character is rendered instead.
However, as the example above demonstrates, sometimes it magically works in the presence of other Unicode characters, e.g. `⁺ - Superscript Plus Sign: U+207A`.
It works as expected in WT and OpenConsole with the DirectX renderer.
It also works as expected in other GDI apps with font fallback, e.g. notepad.exe.
Also, it looks like the fallback glyph isn't clipped properly and can overlap with the next one:

Contributor guide
Research direction
The issue names no repository files or tests. Start by reproducing the U+24D2 case in OpenConsole with the GDI renderer, then compare it with the DirectX renderer and other GDI applications; done means the fallback glyph renders reliably without being clipped or overlapping the next character.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100