Broken rendering/editing/caret experience with emoji sequences #15960

Open
opened 2026-01-31 04:53:27 +00:00 by claunia · 0 comments
Owner

Originally created by @andrew-z on GitHub (Nov 25, 2021).

Windows Terminal version

1.11.2921.0

Windows build number

10.0.22000.0 (actual patch: 22000.348, corresponds to 11C)

Other Software

No response

Steps to reproduce

Open Terminal and type certain emoji sequences.

I didn't do full testing, but this happens especially prominently with emoji 13.0 and 13.1. Examples: transgender flag 🏳️‍⚧️, black cat 🐈‍⬛, polar bear 🐻‍❄️, mending heart ❤️‍🩹 (needs Win11 11C to render correctly). Some older sequences are broken as well, e.g. some variants of family emoji 👨‍👩‍👧. All of these are ZWJ sequences (can contain multiple ZWJs).

Expected Behavior

Emoji sequence is rendered as a single glyph with no invisible characters in the run. Backspace, caret movement and selection treat this glyph as an indivisible entity.

Actual Behavior

From what I observe, it seems that there's an issue (or multiple issues) with many emoji sequences rendering and editing experience:

  • Emoji itself is rendered correctly, but is surrounded with multiple invisible characters (perhaps incorrectly calculated due to multiple codepoints in the cluster). I see that Terminal uses DirectWrite for itemizing the string, so perhaps it's not using the APIs correctly leading to a mismatch between displayed glyph and length of the run reserved for its rendering. DirectWrite (including text shaping engine) itself is updated already to handle emoji up to 13.1 correctly.
  • Caret is moving between invisible characters. Backspace is deleting invisible characters, affecting the rendering.
  • Selection will pick up individual constituents of the sequence (which are not rendered)
Originally created by @andrew-z on GitHub (Nov 25, 2021). ### Windows Terminal version 1.11.2921.0 ### Windows build number 10.0.22000.0 (actual patch: 22000.348, corresponds to 11C) ### Other Software _No response_ ### Steps to reproduce Open Terminal and type certain emoji sequences. I didn't do full testing, but this happens especially prominently with emoji 13.0 and 13.1. Examples: transgender flag 🏳️‍⚧️, black cat 🐈‍⬛, polar bear 🐻‍❄️, mending heart ❤️‍🩹 (needs Win11 11C to render correctly). Some older sequences are broken as well, e.g. some variants of family emoji 👨‍👩‍👧. All of these are ZWJ sequences (can contain multiple ZWJs). ### Expected Behavior Emoji sequence is rendered as a single glyph with no invisible characters in the run. Backspace, caret movement and selection treat this glyph as an indivisible entity. ### Actual Behavior From what I observe, it seems that there's an issue (or multiple issues) with many emoji sequences rendering and editing experience: - Emoji itself is rendered correctly, but is surrounded with multiple invisible characters (perhaps incorrectly calculated due to multiple codepoints in the cluster). I see that Terminal uses DirectWrite for itemizing the string, so perhaps it's not using the APIs correctly leading to a mismatch between displayed glyph and length of the run reserved for its rendering. DirectWrite (including text shaping engine) itself is updated already to handle emoji up to 13.1 correctly. - Caret is moving between invisible characters. Backspace is deleting invisible characters, affecting the rendering. - Selection will pick up individual constituents of the sequence (which are not rendered)
claunia added the Resolution-Duplicate label 2026-01-31 04:53:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15960