Skip to content

Add support for Variation Selector 15 / U+FE0E (Original Title: Unicode Pawn does not display like other Unicode chess symbols) #13110

Open

Description

Windows Terminal version

1.13.10984.0

Windows build number

10.0.22000.0

Other Software

No response

Steps to reproduce

Paste this Unicode character into your terminal ♟(U+265F)
Source: https://en.wikipedia.org/wiki/Chess_symbols_in_Unicode

Expected Behavior

I expected it to match the current foreground color of the terminal similar to the other chess related Unicode symbols.

Actual Behavior

The pawn is always purple. Here's a screenshot of my chess game output in the windows terminal:
image
I can change the foreground color for all the other pieces using ANSI color codes but the pawn is always purple.

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on May 16, 2022
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on May 16, 2022
  3. zadjii-msft commented on May 16, 2022

    @zadjii-msft
    Member

    a minimal repro

    printf "White: \u2654 \u2655 \u2656 \u2657 \u2658 \u2659\nBlack: \u265a \u265b \u265c \u265d \u265e \u265f \n"

    Looks like the black pawn is an emoji, when the others aren't.

    I suspect this is because the chess characters aren't in Cascadia Code (or most fonts), dwrite looks up the glyph in some other font that does have it, and the emoji font shows up higher in the search list than wherever the other pieces are coming from. Hmm.

    Might not be anything we can do here besides changing the font fallback order for glyphs (#2664)

  4. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on May 16, 2022
  5. zadjii-msft commented on May 16, 2022

    @zadjii-msft
    Member

    See also #6864, but like the opposite. The black bawn is "emoji yes, emoji-presentation no", so it shouldn't be rendered by dwrite as an emoji, but it is. Hmm.

  6. j4james commented on May 16, 2022

    @j4james
    Collaborator

    My understanding is that there are a number of glyphs that have both a text presentation and an emoji presentation, and you can use a variant selector to choose which style you want. They each have a default style though (when no variant selector is used), and in the case of the black pawn, the default style is meant to be text.

    I'm sure I've seen a document somewhere that list all the default styles in a simple table, but the best I can find at the moment is this: https://www.unicode.org/emoji/charts/text-style.html

  7. paul-hansen commented on May 16, 2022

    @paul-hansen
    Author

    I suspect this is because the chess characters aren't in Cascadia Code (or most fonts), dwrite looks up the glyph in some other font that does have it, and the emoji font shows up higher in the search list than wherever the other pieces are coming from.

    That seems accurate, I confirmed it does use the font's symbol if you use a font that has the symbols. I found a font that has chess symbols using this page https://www.fontspace.com/unicode/char/265C-black-chess-rook
    image

    The issue you linked would help a lot, enabling us to set it up the way we want on our own PCs. However it's not a great solution for if I wanted to distribute software that uses those symbols though. I would have to instruct all users on how to install a special font correctly if they are using Windows Terminal. Any ideas on how to address where the default is coming from?

    If it was consistent and all the Unicode chess pieces were rendered as emoji, that would okay too. At least they would be usable together.

    Seems like this isn't limited to Windows Terminal:
    Discord has a similar issue:
    image
    And in Chrome:
    image

    I'm not sure if that means it's a Windows OS problem, or the best way to report that if it is. Maybe I should report it in the WinUI repo? https://github.com/microsoft/microsoft-ui-xaml Seems like they would probably just have to escalate it to whoever works on DirectWrite or something too though.

  8. paul-hansen commented on May 16, 2022

    @paul-hansen
    Author

    My understanding is that there are a number of glyphs that have both a text presentation and an emoji presentation, and you can use a variant selector to choose which style you want. They each have a default style though (when no variant selector is used), and in the case of the black pawn, the default style is meant to be text.

    I'm sure I've seen a document somewhere that list all the default styles in a simple table, but the best I can find at the moment is this: https://www.unicode.org/emoji/charts/text-style.html

    Apparently U+FE00 - U+FE0F are supposed to be variant selectors which you put after the Unicode character you want to modify. I'm having a hard time finding documentation on which ones do what though. In my testing in WT, all of them just make the character double wide (which is how my chess board looks so square in the first screenshot)

    According to https://stackoverflow.com/a/38452396/5399098 U-FE0E is supposed to force the text version.
    Black Pawn:♟️
    Black Pawn with ︎:♟
    White Pawn: ♙️
    Doesn't seem to work on Github for me but you can copy it into the textbox on https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea and it works there for me.
    image

  9. DHowett commented on May 17, 2022

    @DHowett
    Member

    Just driving by to say: this touches on #1472 and friends (#8000)!

  10. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on May 3, 2023
  11. lhecker commented on May 16, 2024

    @lhecker
    Member

    It seems we forgot to mention here that the latest Windows Terminal version now has a setting to disable colored Emojis:
    image

    However, we still need to add support for handling VS-15 and VS-16 so that colored and uncolored Emojis can be mixed. That's a little bit more difficult unfortunately and currently not that high of a priority.

  12. Ashutosh-Chikhaliya commented on Sep 22, 2024

    @Ashutosh-Chikhaliya
  13. czy-29 commented on Jul 6, 2025

    @czy-29

    VS-16 needs to be supported, I need colored ♠️♥️♣️♦️ characters, I hope we can support it!

  14. paul-hansen commented on Jul 6, 2025

    @paul-hansen
    Author

    It's possible that someone (Mike Griese (@zadjii-msft) maybe) should re-evaluate the priority of this issue. It's been in the backlog as p-3 for several years and issues are being closed as duplicates to it. I feel like this issue isn't as high priority as some of those closed issues might be considered (more than just the pawn affected).

    (Personally I'm unsubscribing from this issue as I abandoned the project where I wanted this and I use wezterm now. Good luck!)

  15. zakaryan2004 commented on Nov 22, 2025

    @zakaryan2004
  16. changed the title [-]Unicode Pawn does not display like other Unicode chess symbols[/-] [+]Add support for Variation Selector 15 / U+FE0E (Original Title: Unicode Pawn does not display like other Unicode chess symbols)[/+] on Apr 6, 2026
  17. iSazonov commented on Jun 22, 2026

    @iSazonov

    It might be useful what I found while porting GraphemeTableGen (and CodepointWidthDetector.cpp ) to C#.

    1. Variation Selectors VS15 (0xFE0E) and VS16 (0xFE0F) is applied only to unicode scalars from https://www.unicode.org/Public/17.0.0/ucd/emoji/emoji-variation-sequences.txt
    2. The Unicode database is a primary source https://www.unicode.org/Public/17.0.0/ucdxml/ucd.unihan.grouped.zip and all the unicode scalars are enumerated there in <standardized-variants> section with desc="emoji style" or desc="text style".
    3. The list is frozen (deprecated). This means that the list will not expand. Instead, new codes will be allocated for new emojis.
    4. The list contains 371 elements.
    5. The EPres (Emoji_Presentation) property of these elements indicates default text/emoji rendering style of these elements.
      5.1. Fortunately, all elements in the list with EPres="Y" (emoji) are wide (ea="W") and do not require a default width correction in GraphemeTableGen.
      5.2. Elements with EPres="N" (text) have ea equal to W,N,Na and A and do not require a default width correction too.
      5.3. So you have no need to update GraphemeTableGen to process EPres and correct defaut width.
    6. Now in CodepointWidthDetector.cpp only VS16 is taken into account (set w = 2).
      // U+FE0F Variation Selector-16 is used to turn unqualified Emojis into qualified ones.
      // By convention, this turns them from being ambiguous width (= narrow) into wide ones.
      // We achieve this here by explicitly giving this codepoint a wide width.
      // Later down below we'll clamp width back to <= 2.
      if (cp == 0xFE0F)
      {
      w = 2;
      }

      Perhaps you need to add VS15 (set w = 1 like Kitty does). (This code assumes that the string has the correct Unicode
      format - the VS15 and VS16 follow strictly the characters from this emoji-variation-sequences.txt list, and does not check this.).
    7. If VS15 and VS16 are processed unconditionally, then it may make sense to adjust their length in GraphemeTableGen from 0 to 1 and 2, respectively, to exclude extra checks in _graphemeNext() (_graphemePrev).
    8. I guess there is something in rendering that you need enhance. I hope the table of 371 elements is not a problem to add it there.

    emoji-variation-sequences.txt.xlsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-FontsRelated to the fontArea-RenderingText rendering, emoji, complex glyph & font-fallback issuesIssue-BugIt either shouldn't be doing this or needs an investigation.Priority-3A description (P3)Product-TerminalThe new Windows Terminal.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions