-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode Pawn does not display like other Unicode chess symbols #13110
Comments
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) |
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. |
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 |
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 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: 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. |
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. |
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:

I can change the foreground color for all the other pieces using ANSI color codes but the pawn is always purple.
The text was updated successfully, but these errors were encountered: