Skip to content
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

Closed
4 tasks done
HLFH opened this issue May 23, 2018 · 87 comments
Closed
4 tasks done

Add emoji support to Windows Console #190

HLFH opened this issue May 23, 2018 · 87 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Conhost For issues in the Console codebase
Milestone

Comments

@HLFH
Copy link

HLFH commented May 23, 2018

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

Preview Give feedback
  1. Area-CookedRead Area-Input In-PR Issue-Feature Needs-Tag-Fix Priority-1 Product-Conhost
  2. Area-CookedRead Area-Input Impact-Correctness Issue-Bug Issue-Scenario Needs-Tag-Fix Product-Conhost Product-Conpty
    lhecker

Output

Preview Give feedback
  1. Area-Output Area-Server Issue-Scenario Needs-Tag-Fix Product-Conhost Product-Terminal
  2. Area-Rendering Issue-Feature Needs-Tag-Fix Product-Conhost Product-Terminal
    lhecker
@HLFH HLFH changed the title Add emoji support to Windows Console #590 Add emoji support to Windows Console May 23, 2018
@zadjii-msft zadjii-msft added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. backlog labels May 23, 2018
@zadjii-msft zadjii-msft added this to the Backlog milestone May 23, 2018
@zadjii-msft zadjii-msft added the Product-Conhost For issues in the Console codebase label May 23, 2018
@zadjii-msft
Copy link
Member

Already on the backlog :)

@mikemaccana
Copy link
Contributor

Sweet! Another use case: I have a command line app that outputs warnings using ⚠.

@mqudsi
Copy link

mqudsi commented May 26, 2018

@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?

@zadjii-msft
Copy link
Member

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.

@adiviness
Copy link
Contributor

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.

@bitcrazed bitcrazed added the Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues label May 29, 2018
@SidShetye
Copy link

+1 Our build and CI scripts have emojis for success ✔️, warning ⚠ and errors ❌ for quick, productive eyeballing of logs.

@miniksa
Copy link
Member

miniksa commented Jun 5, 2018

Can we please not +1 issues? Please use reactions or subscribe to notifications.

@SidShetye
Copy link

SidShetye commented Jun 5, 2018

@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.

@bitcrazed
Copy link
Contributor

@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 ;)

@luxalpa
Copy link

luxalpa commented Aug 30, 2018

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 :/

@bitcrazed
Copy link
Contributor

Thanks @destructive-dragon - there are many tools that contain/emit emoji, but the Console is not yet able to render them.

@kavdev
Copy link

kavdev commented Oct 17, 2018

@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?

@bitcrazed
Copy link
Contributor

@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.

@lloydjatkinson

This comment has been minimized.

@paul-at
Copy link

paul-at commented Jan 16, 2022

Is this still on the backlog? Unicode 13 was released in March 2020...

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.

@brupelo
Copy link

brupelo commented Dec 10, 2022

Hey guys, is this the official thread about emoji support?

I've just tried Version: 1.15.2874.0 running a simple python script that uses rich:

from rich._emoji_codes import EMOJI
from rich.console import Console

if __name__ == "__main__":
    console = Console()
    for k, v in EMOJI.items():
        console.print(f":{k}:")

And everything has rendered correctly on win10... Problem comes if I try to add emojis manually by pressing win+.,
in that case I'll just get an incorrect render, ie:

image

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!

@zadjii-msft
Copy link
Member

To clarify:

This has kinda become the mega thread for both, though, most of the remaining work remains in #7777.

@brupelo
Copy link

brupelo commented Dec 18, 2022

@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:

WindowsTerminal_2022-12-18_15-33-43

You can see how in SublimeText the emojis are rendered properly, similar in the good old clipbrd.exe software but when i copy/paste into wt the render will be broken.

You can find the emojis.txt file attached
here

@zadjii-msft
Copy link
Member

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 chcp 65001) does better (though, there's a LOT of emoji in that file leveraging ZWJ's, so those doen't behave super well. That's the output side of things).

@o-sdn-o
Copy link

o-sdn-o commented Jan 3, 2023

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

@zadjii-msft
Copy link
Member

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.

@marklit
Copy link

marklit commented Jun 2, 2023

Will there be support for country flags at some point?

image

@TheDecryptor
Copy link

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.

@marklit
Copy link

marklit commented Jun 4, 2023

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.

@Welding-Torch
Copy link

When will we get Nerd Font Icons(Glyphs) support in conhost.exe?

@DHowett
Copy link
Member

DHowett commented Apr 5, 2024

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.

@microsoft microsoft locked as off-topic and limited conversation to collaborators Apr 5, 2024
@lhecker
Copy link
Member

lhecker commented Jul 22, 2024

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.

@lhecker lhecker closed this as completed Jul 22, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Jul 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Tag-Fix Doesn't match tag requirements Product-Conhost For issues in the Console codebase
Projects
None yet
Development

No branches or pull requests