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 support for Color Emoji support #91

Open
dotMorten opened this Issue Dec 5, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@dotMorten
Collaborator

dotMorten commented Dec 5, 2018

Currently when you render emojis in WPF, they are rendered black'n'white, and not rendering with the correct emoji color.
It would be good if we could update the text rasterizer renderers to render with the correct color.
There's a proof of concept implementation here: https://github.com/samhocevar/emoji.wpf, so perhaps @samhocevar would be willing to contribute? (I'm guessing this would be done on the DirectWrite level though)

Screenshot from Emoji.WPF
image

Documentation how this works from https://blogs.windows.com/buildingapps/2017/06/06/using-color-fonts-beautiful-text-icons/#Crwe2VHsjP5PgAXS.97 (thanks @mikedn):
image

Also for discussion: Should we have a IsColorFontEnabled property that turns this behavior on/off, and should it be default like in UWP (behavior change). Also only 8.1+ uses the D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT flag, so I'm assuming the behavior would always be black/white on Win7 and 8.0

@mikedn

This comment has been minimized.

mikedn commented Dec 5, 2018

I'm guessing this would be done on the DirectWrite level though

Yes, DWrite should already handle this if you tell it so:

https://blogs.windows.com/buildingapps/2017/06/06/using-color-fonts-beautiful-text-icons

@dotMorten

This comment has been minimized.

Collaborator

dotMorten commented Dec 5, 2018

@mikedn Thanks. Info added to issue

@mikedn

This comment has been minimized.

mikedn commented Dec 5, 2018

Ahm, but then WPF doesn't actually use D2D, it only uses DWrite. That might mean that to implement this you need to do some more involved work in WPF's rendering code. I think, it's been a while since I looked at WPF's text rendering...

@fabiant3

This comment has been minimized.

Member

fabiant3 commented Dec 5, 2018

@dotMorten - This looks like a great feature addition. Unfortunately, at this time we are unsure of the exact time when the native layers will be open sourced. I will move this to future for now.

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