After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794705 - Color Emoji Fonts not working on Windows 10
Color Emoji Fonts not working on Windows 10
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: cairo
1.42.x
Other Windows
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2018-03-26 17:22 UTC by lovetox
Modified: 2018-05-22 13:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Emoji display on GTK+ apps before and after adding the "emoji" font family to PangoWin32 (830.84 KB, text/plain)
2018-03-30 08:26 UTC, Fan, Chun-wei
  Details
Emoji display on GTK+ apps before and after adding the "emoji" font family to PangoWin32 (830.84 KB, image/png)
2018-03-30 08:30 UTC, Fan, Chun-wei
  Details
pangowin32-fontmap.c: Add an Emoji font family in the builtin_aliases array (1.93 KB, patch)
2018-03-30 08:41 UTC, Fan, Chun-wei
committed Details | Review

Description lovetox 2018-03-26 17:22:54 UTC
The new emoji chooser in GTK will not render emojis with the color emoji font that is installed on Windows 10

Im not sure this is a Pango Issue, but its my first guess
Comment 1 Behdad Esfahbod 2018-03-26 18:18:35 UTC
It's a Cairo issue.
Comment 2 Fan, Chun-wei 2018-03-30 08:26:41 UTC
Created attachment 370329 [details]
Emoji display on GTK+ apps before and after adding the "emoji" font family to PangoWin32

Hi,

There are a few issues involved with this, starting with a simple one, up to a rather complex one...

Let's tackle the simple one first.  By adding an "emoji" font family to the builtin_aliases array in pangowin32-fontmap.c, and using the Segoe UI Emoji font (and fallback fonts like Segoe UI Symbol and Segoe UI), with the same Emojis that are input, the Emojis are displayed correctly (see the dialog box that is enclosed in brown borders).

I will attach a patch shortly, which is the update to pangowin32-fontmap.c, that is used to add the "emoji" font family.

p.s. To achieve colored Emoji on native Windows, there is much bigger work involved, as GDI and Uniscribe does not support colored Emoji, and thus requires porting to Direct2D and DirectWrite, in PangoWin32 *and* most probably Cairo.

p.s.: Since Windows have native input support for Emojis since Windows 8, I think I will also open another bug to prevent using GTK+'s built-in Emoji input panel when we are on Windows 8 or later, but make it available to Windows Vista/7 users.

With blessings, thank you!
Comment 3 Fan, Chun-wei 2018-03-30 08:30:15 UTC
Created attachment 370331 [details]
Emoji display on GTK+ apps before and after adding the "emoji" font family to PangoWin32

(sorry, re-attaching as I selected the patch option for the image, which was totally wrong)
Comment 4 Fan, Chun-wei 2018-03-30 08:41:38 UTC
Created attachment 370333 [details] [review]
pangowin32-fontmap.c: Add an Emoji font family in the builtin_aliases array

Hi,

This is the patch that updates Pango to have a builtin Emoji font family that maps to the usable Windows fonts from Microsoft, which will support the display of Emoji, albeit not in colored form.

With blessings, thank you!
Comment 5 Behdad Esfahbod 2018-03-31 10:18:57 UTC
Please commit. Thanks.
Comment 6 Fan, Chun-wei 2018-03-31 15:40:46 UTC
Hi Behdad,

Thanks for the ack, I pushed the patch as b136f150.

With blessings, and thank you!

[Keeping this bug open as there is still quite a bit more work involved to get colored Emoji support on Windows (without FontConfig).]
Comment 7 lovetox 2018-04-01 23:34:21 UTC
Thanks Fan, Chun-wei

Does that mean there is a way to have colored emojis WITH FontConfig on Windows right now?

If yes it would be nice if you could point me into the right direction how to make that possible

Thanks
Comment 8 Fan, Chun-wei 2018-04-02 06:10:53 UTC
Hi lovetox,

(In reply to lovetox from comment #7)
> Does that mean there is a way to have colored emojis WITH FontConfig on
> Windows right now?

Unfortunately, no.  Cairo still makes use of GDI (and possibly Uniscribe) internally on Windows, so that needs to be updated first before we can have colored Emoji fonts on Windows.  I think that was what Behdad was initially referring to when he said it's a Cairo issue.

With blessings, and cheers!
Comment 9 Behdad Esfahbod 2018-04-03 06:14:13 UTC
Pango doesn't do any drawing. So it's a cairo issue. That's what I meant.
Comment 10 GNOME Infrastructure Team 2018-05-22 13:31:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pango/issues/302.