dotnet / dotnet/wpf

Add support for Color Emoji support

Open
#91 25 comments 74 reactions 0 assignees View on GitHub
:construction: work in progress Design Discussion Enhancement Requested
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

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](https://user-images.githubusercontent.com/1378165/49545342-32714d80-f892-11e8-9cbf-ba0d87724c47.png)

Documentation how this works from https://blogs.windows.com/buildingapps/2017/06/06/using-color-fonts-beautiful-text-icons/#Crwe2VHsjP5PgAXS.97 (thanks @mikedn):
![image](https://user-images.githubusercontent.com/1378165/49545803-86306680-f893-11e8-98dc-1554bd6179ee.png)

Also for discussion: Should we have a [IsColorFontEnabled](https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Controls.TextBlock#Windows_UI_Xaml_Controls_TextBlock_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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.