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

Closed
opened 2026-01-31 04:53:34 +00:00 by claunia · 3 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:34 +00:00
Author
Owner

@j4james commented on GitHub (Nov 25, 2021):

Yeah, zero-width joiners are not supported yet. This is probably a duplicate of #1472 and/or #8000.

@j4james commented on GitHub (Nov 25, 2021): Yeah, zero-width joiners are not supported yet. This is probably a duplicate of #1472 and/or #8000.
Author
Owner

@zadjii-msft commented on GitHub (Nov 25, 2021):

Yea, I'd agree with that.

/dup #1472
/dup #8000
/dup #190

@zadjii-msft commented on GitHub (Nov 25, 2021): Yea, I'd agree with that. /dup #1472 /dup #8000 /dup #190
Author
Owner

@ghost commented on GitHub (Nov 25, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Nov 25, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15965