Closed Bug 1153460 Opened 9 years ago Closed 9 years ago

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

Categories

(Core :: Graphics: Text, defect)

x86
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla40
Tracking Status
firefox38 --- verified disabled
firefox39 --- verified
firefox40 --- verified
relnote-firefox --- 39+

People

(Reporter: Nomis101, Assigned: jfkthame)

References

Details

(Keywords: dev-doc-complete, Whiteboard: gfx-noted)

Attachments

(4 files)

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.
Attached file testcase
This is a html test page with skin tone emojis and new flags
OS: All → Mac OS X
Hardware: All → x86
Component: Graphics → Graphics: Text
Whiteboard: gfx-noted
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: nobody → jfkthame
Status: NEW → ASSIGNED
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
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
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?
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?
(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.
Depends on: 1154723
(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.
Attached image 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?
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?
Attachment #8591970 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
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
We shipped that in 39, not 40.
Removed from the 40 release notes.
Not sure we want to document that but in case... :)
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: