microsoft/Terminal

“ⓒ" U+24D2 fallback rendering in conhost / GDI

开放

#10,930 创建于 2021年8月12日

 (0 条评论) (2 个反应) (0 位负责人)C++ (9,275 个派生)batch import
Area-RenderingHelp WantedIssue-BugPriority-3Product-Conhost

仓库指标

星标
 (103,173 个星标)
PR 合并指标
 (平均合并 27天 19小时) (30 天内合并 24 个 PR)

描述

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:
@echo off
chcp 65001

echo ⓒ
echo ⁺ⓒ
  1. Save as test.cmd in UTF-8 encoding (or download test.cmd.txt and rename).
  2. Build and run the latest OpenConsole.
  3. Set the font to Consolas.
  4. Run test.cmd.

Expected Behavior

image

Actual Behavior

image

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:

image

贡献者指南