-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add emoji support to Windows Console #190
Comments
Already on the backlog :) |
Sweet! Another use case: I have a command line app that outputs warnings using ⚠. |
@zadjii-msft will this include support for non-latin unicode characters? i.e. can Arabic or Japanese characters not found in the currently deployed console font be displayed with a different font face? |
Hypothetically, yes. Arabic is kinda it's own problem though - there's pretty much no chance we'll be implementing left to right language support any time soon, bt the characters might be able to render correctly. @adiviness can speak more on the topic if there's more to share. |
Arabic is a difficult one because of the additional support required for bidirectional text and ligatures. As far as I’m aware not many terminal emulators currently support it. There is also a difference between the console being able to render emoji and supporting font fallback in the case of the current font not having a glyph. They are both items on our backlog. |
+1 Our build and CI scripts have emojis for success ✔️, warning ⚠ and errors ❌ for quick, productive eyeballing of logs. |
Can we please not +1 issues? Please use reactions or subscribe to notifications. |
@miniksa , I wouldn’t get too distracted by the +1. You could entirely ignore it. The main purpose of typing it out was to articulate the use case. Presumably platform/product owners ought to be very interested in customer use cases ... thought granted in this case it’s not too extravagant. |
@SidShetye - appreciate your comment - your use-case is not unusual, but is useful to hear about. In general, we ask people not to +1 because we'd like to avoid people +1-ing (esp. with no further comment), which just ends up as noise, and makes threads more difficult to parse and manage. Sharing additional comments, context, observations, issues, etc. is FAR more valuable than a +1 ;) |
Weird that nobody mentioned it, but the Yarn package manager uses Emoji's and it's a bit annoying that they are only displayed as squares :/ |
Thanks @destructive-dragon - there are many tools that contain/emit emoji, but the Console is not yet able to render them. |
@bitcrazed You mentioned in this twitter thread on the conpty release that we still need to wait for a new buffer and a new renderer (DirectWrite). Are those the only two major blockers left? |
@kavdev Essentially, yes. To display emoji glyphs, we first have to be able to store (potentially compound) Unicode code-points for each glyph (E.g. Ninjacats), but we also have to be able to render them, which requires font-fallback, which GDI doesn't support. We'll be working on improvements to both the Console's text buffer implementation, and also the Renderer in future releases. |
This comment has been minimized.
This comment has been minimized.
Seems to work for me at the moment in Windows Terminal Preview 1.12.3472.0 in both PS 5.1 and WSL2/Ubuntu, although #1472 bug (in a form of a broken Unicode sequence when using backspace) is still there. |
Hey guys, is this the official thread about emoji support? I've just tried
And everything has rendered correctly on win10... Problem comes if I try to add emojis manually by pressing Anyway, is this one already reported? Is this the right backlog work-item to suscribe to? I've read another ones pinging to this one so I'm assuming it's the "official" one... 🙄 Evolving really nicely the software btw, congrats guys! |
To clarify:
This has kinda become the mega thread for both, though, most of the remaining work remains in #7777. |
@zadjii-msft Hey Mike, thanks, cool stuff. So I guess the issue happening when copy/pasting emojis from other software such as SublimeText and not being rendered properly is also a related work-item from this one, ie: You can see how in SublimeText the emojis are rendered properly, similar in the good old You can find the emojis.txt file attached |
Yea, basically what you're seeing is the Input version there. Pasting emoji into cmd.exe is akin to just typing an emoji at the prompt, and cmd.exe does a bad/nonexistent job of rendering those. Just outputting that file straight to the Terminal (after a |
It seems to me that cmd.exe does not play any role here. Between cmd.exe and Windows Terminal there is conhost.exe (openconsole.exe), it is responsible for such handling of emoji. If we replace conhost.exe (openconsole.exe) with something of our own, then there will be the expected result Terminal.Dev.2023-01-03.19-41-56.mp4 |
Sorry, I omitted details for the sake of brevity. Cmd.exe uses the COOKED_READ input handling provided by the Console API, and the server for that API is conhost. So yes, patching openconsole (=== conhost.exe) will fix this, and that's what the whole collection of issues is about. |
That's outside of Terminal's control, the Segoe UI Emoji font just doesn't include flags. #2664 would allow customising the fonts Terminal tries to use, you could then include something like "Noto Color Emoji", which does include graphical flags. |
Has anyone here tried to edit the Segoe UI Emoji font file and add in / replace the country flag emojis from another font? The Terminal doesn't support images so printing out GIFs or SVGs is a non-starter. |
When will we get Nerd Font Icons(Glyphs) support in conhost.exe? |
You should be able to install a "nerd font" font and set it as your font today. Also last year, and perhaps some years prior to that one. |
With #16916 merged and with all the work that led up to it, support for complex Unicode, including Emoji, is effectively done. There are some smaller issues left to clean up, but I expect them to be a rare encounter. As such I'll close this issue for now. This will ship in Windows Terminal 1.22 this year. If you want to try it out right now, please feel free to download our Canary (nightly) build here: #16121 Please note that PowerShell does not have support for complex Unicode yet, but that's expected to change in the foreseeable future (no exact date yet). I'll keep this issue locked since a lot of people are subscribed to it and would get notifications every time someone posts here. If you find any issues with our implementation, please report a new issue. If you have any other feedback, please feel free to start a new discussion. |
Please support emoji within Windows Console.
Very useful when you code in
vim
newsletters for startups or when you categorize stuff by emoji.Maintainer notes:
Input
Output
The text was updated successfully, but these errors were encountered: