Add support for new Unicode 8.0 skin tone emojis (iOS 8.3, OS X 10.10.3) to Gecko

VERIFIED FIXED in Firefox 39

Status

()

Core
Graphics: Text
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: Nomis101, Assigned: jfkthame)

Tracking

({dev-doc-complete})

Trunk
mozilla40
x86
Mac OS X
dev-doc-complete
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?
qe-verify +

Firefox Tracking Flags

(firefox38 verified disabled, firefox39 verified, firefox40 verified, relnote-firefox 39+)

Details

(Whiteboard: gfx-noted)

Attachments

(4 attachments)

(Reporter)

Description

3 years ago
Created attachment 8591118 [details]
Current look of new emojis (example with TB 40)

iOS 8.3 and OS X 10.10.3 added support for new Unicode 8.0 emojis with skin tone modifier. And new flag emojis. Currently this new emojis are not displayed correctly in Firefox or Thunderbird. We should also add support for this new emojis in Gecko.

In the screenshot you should see in the first two rows emojis with different skin tones and in the last row some new flag emojis. But you see first the emoji and than a square of the skin tone. And no flag is displayed.
(Reporter)

Comment 1

3 years ago
Created attachment 8591212 [details]
testcase

This is a html test page with skin tone emojis and new flags

Updated

3 years ago
OS: All → Mac OS X
Hardware: All → x86

Updated

3 years ago
Duplicate of this bug: 1153732
Component: Graphics → Graphics: Text
Whiteboard: gfx-noted
(Assignee)

Comment 3

3 years ago
Created attachment 8591970 [details] [diff] [review]
Support new Fitzpatrick emoji modifiers and regional symbol indicators in Apple Color Emoji font

The reason these characters fail is that one of the high surrogate codepoints involved is flagged as a possible bidi char (by gfxFontUtils::PotentialRTLChar), which forces gfxCoreTextShaper to bidi-wrap the string; then the period added at the end of the text causes Core Text font fallback; and this means we abandon Core Text shaping and fall back to harfbuzz, which doesn't support the 'morx' feature the font is using to ligate the glyphs here. Solution is to simply ignore glyph runs that only result from the bidi-wrapping.
Attachment #8591970 - Flags: review?(jdaggett)
(Assignee)

Updated

3 years ago
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

Updated

3 years ago
Attachment #8591970 - Flags: review?(jdaggett) → review+
https://hg.mozilla.org/mozilla-central/rev/f43e2b12fe33
https://hg.mozilla.org/mozilla-central/rev/d19d1522ce46
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
(Assignee)

Comment 7

3 years ago
Comment on attachment 8591970 [details] [diff] [review]
Support new Fitzpatrick emoji modifiers and regional symbol indicators in Apple Color Emoji font

Although this is not a regression, given that Apple is already shipping a font that implements the skin-tone modifiers, and given the straightforward nature and limited scope of the patch, I think we should consider uplifting to Aurora and perhaps Beta.

Without this, Firefox (and Thunderbird) users will see inferior rendering of the new "inclusive" emoji, which will reflect poorly on Mozilla's products and may prompt users to consider using other browsers.

Approval Request Comment
[Feature/regressing bug #]: no regression -- compatibility with new OS X version

[User impact if declined]: poor rendering for new emoji in OS X 10.3.3

[Describe test coverage new/current, TreeHerder]: tested locally (requires emoji font from recent OS X Yosemite release 10.3.3)

[Risks and why]: minimal risk; Mac-only patch that just avoids unnecessary fallback to a non-CoreText codepath for the emoji sequences

[String/UUID change made/needed]: none
Attachment #8591970 - Flags: approval-mozilla-beta?
Attachment #8591970 - Flags: approval-mozilla-aurora?
status-firefox38: --- → affected
status-firefox39: --- → affected
Flags: qe-verify+
Comment on attachment 8591970 [details] [diff] [review]
Support new Fitzpatrick emoji modifiers and regional symbol indicators in Apple Color Emoji font

Taking it for aurora to get more testing. Once QE verified it, we might uplift it to 38 (but not sure).
Attachment #8591970 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Jonathan, btw, would it be possible to write tests for this?
(Assignee)

Comment 10

3 years ago
(In reply to Sylvestre Ledru [:sylvestre] from comment #9)
> Jonathan, btw, would it be possible to write tests for this?

Are our test slaves running 10.10.3 yet? Once we have that in place, we could write reftests that exercise this code, but I'm not sure of the current status.... trying IRC to see if someone knows.
(Assignee)

Updated

3 years ago
Depends on: 1154723
(Assignee)

Comment 11

3 years ago
(In reply to Jonathan Kew (:jfkthame) from comment #10)
> (In reply to Sylvestre Ledru [:sylvestre] from comment #9)
> > Jonathan, btw, would it be possible to write tests for this?
> 
> Are our test slaves running 10.10.3 yet?

Not yet, it turns out. I've filed bug 1154723 requesting an update of the test slaves. When that's done, we can add reftests here.
https://hg.mozilla.org/releases/mozilla-aurora/rev/869f5b771a28
status-firefox39: affected → fixed
Flags: in-testsuite?

Comment 13

3 years ago
Created attachment 8593683 [details]
AFTER:

\o/
(In reply to Jonathan Kew (:jfkthame) from comment #11)
> Not yet, it turns out. I've filed bug 1154723 requesting an update of the
> test slaves. When that's done, we can add reftests here.

Could we not simply commit a test font to the tree that has glyphs for these code points?
(Assignee)

Comment 15

3 years ago
It'd need to not just support the code points, but also provide an AAT ligature feature that implements the emoji + color-swatch combinations; that's what failed prior to the patch here. And to use such a font via @font-face (rather than having it available in the system font list), we'd need to get the AAT tables past OTS; currently, it strips them.

So in principle, yes, but it'd be a substantial amount of work -- both to create a font that adequately tests this, and then to enable Gecko to use it.
I won't take it in 38: it is a new feature, there is no rush and most of our ESR users won't care about this.
However, we might want to relnote that in 39

Release Note Request (optional, but appreciated)
[Why is this notable]: new feature
[Suggested wording]: Support for new Unicode 8.0 skin tone emoji
[Links (documentation, blog post, etc)]: Do we have anything?
status-firefox38: affected → verified disabled
relnote-firefox: --- → ?
Attachment #8591970 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
relnote-firefox: ? → 40+
Confirming that the new Unicode 8.0 skin tone emoji are properly displayed on Mac OS X 10.10.4 using:
- latest Aurora, build ID: 20150622004006;
- Firefox 39 RC, build ID: 20150622181234.
Status: RESOLVED → VERIFIED
status-firefox39: fixed → verified
status-firefox40: fixed → verified
We shipped that in 39, not 40.
Removed from the 40 release notes.
relnote-firefox: 40+ → 39+
Not sure we want to document that but in case... :)
Keywords: dev-doc-needed
I've added a note in: https://developer.mozilla.org/en-US/Firefox/Releases/39#Miscelleanous
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.