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 781123 - Handling emoji presentation 0xfe0e and 0xfe0f
Handling emoji presentation 0xfe0e and 0xfe0f
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2017-04-10 10:42 UTC by Takao Fujiwara
Modified: 2017-05-23 04:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for pango-context.c (1.19 KB, patch)
2017-04-10 10:45 UTC, Takao Fujiwara
none Details | Review
Patch for pango-context.c (1.67 KB, patch)
2017-05-10 08:43 UTC, Takao Fujiwara
none Details | Review
Patch for pango-context.c (1.68 KB, patch)
2017-05-18 03:54 UTC, Takao Fujiwara
none Details | Review
Patch for pango-context.c (1.68 KB, patch)
2017-05-18 03:57 UTC, Takao Fujiwara
none Details | Review
Patch for pango-context.c (1.80 KB, patch)
2017-05-22 07:39 UTC, Takao Fujiwara
accepted-commit_now Details | Review

Description Takao Fujiwara 2017-04-10 10:42:39 UTC
0xfe0e and 0xfe0f are emoji presentation of emoji text mode and color mode. [1]
"Noto Color Emoji" font does not include 0xfe0f so current Pango draws the sequence of "0x0023 fe0f 20e3" as two characters since fe0f is included in "DejaVu" font.
I think fe0e and fe0f can be handled by Pango when a emoji font does not include them.
What do you think about it?

The following patch can draw the "0x0023 fe0f 20e3" as one char.
Comment 1 Takao Fujiwara 2017-04-10 10:42:58 UTC
[1] http://www.unicode.org/emoji/charts/emoji-variants.html
Comment 2 Takao Fujiwara 2017-04-10 10:45:20 UTC
Created attachment 349594 [details] [review]
Patch for pango-context.c
Comment 3 Mike FABIAN 2017-04-17 06:24:08 UTC
See also: https://bugzilla.gnome.org/show_bug.cgi?id=780669
Comment 4 Peng Wu 2017-04-21 08:25:03 UTC
Checked "DejaVu Sans" and "Noto Color Emoji" fonts,
it seems some fonts includes "DejaVu Sans" contain
"0xFE0E" and "0xFE0F" vector glyphs, but "Noto Color Emoji"
doesn't contain "0xFE0E" and "0xFE0F" glyphs.

Another problem maybe:
"DejaVu Sans" contains mostly vector glyphs,
but "Noto Color Emoji" only contains color bitmap glyphs.
pango seems to prefer to use vector glyphs over bitmap glyphs.

I think Fujiwara San’s patch will ignore the fonts selected
by "0xFE0E" and "0xFE0F" glyphs.
Comment 5 Takao Fujiwara 2017-05-10 08:43:07 UTC
Created attachment 351520 [details] [review]
Patch for pango-context.c

Rephrased the patch.
Comment 6 Behdad Esfahbod 2017-05-17 22:14:15 UTC
We should at least do that for all Unicode Variation Selector characters.
Comment 7 Takao Fujiwara 2017-05-18 03:54:09 UTC
Created attachment 352060 [details] [review]
Patch for pango-context.c

(In reply to Behdad Esfahbod from comment #6)
> We should at least do that for all Unicode Variation Selector characters.

I updated the patch.
Comment 8 Takao Fujiwara 2017-05-18 03:57:49 UTC
Created attachment 352061 [details] [review]
Patch for pango-context.c

Forgot to obsolete the previous patch.
Comment 9 Behdad Esfahbod 2017-05-21 02:36:40 UTC
Review of attachment 352061 [details] [review]:

Thanks.  Can you also update the comment?  Say we don't want to change font for variation selectors.

Also, here's the full list of variation selectors:
U+FE00..U+FE0F,U+E0100..U+E01EF
Comment 10 Takao Fujiwara 2017-05-22 07:39:40 UTC
Created attachment 352342 [details] [review]
Patch for pango-context.c

(In reply to Behdad Esfahbod from comment #9)
> Review of attachment 352061 [details] [review] [review]:
> 
> Thanks.  Can you also update the comment?  Say we don't want to change font
> for variation selectors.
> 
> Also, here's the full list of variation selectors:
> U+FE00..U+FE0F,U+E0100..U+E01EF

I updated the patch.
Comment 11 Behdad Esfahbod 2017-05-22 20:08:03 UTC
Review of attachment 352342 [details] [review]:

Thanks.
Comment 12 Takao Fujiwara 2017-05-23 03:08:39 UTC
Could you commit my patch on behalf of me?
I have no commit right after GNOME have switched to Git.
Comment 13 Behdad Esfahbod 2017-05-23 04:01:22 UTC
Done.  Thanks.