Emoji no longer appearing on getemoji.com and twitter.com, on Android

RESOLVED FIXED in Firefox 51

Status

()

defect
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: wisniewskit, Assigned: lsalzman)

Tracking

({regression})

51 Branch
Firefox 53
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(platform-rel +, firefox51+ verified, firefox52 verified)

Details

(Whiteboard: webcompat [platform-rel-Twitter], )

Attachments

(3 attachments, 1 obsolete attachment)

In version 49, emoji appear on getemoji.com. In 50 and up, almost none of them do (testing on pristine profiles on my Android 4.4.1 phone). The page itself just specifies the CSS font family as Segoe UI Emoji, nothing fancy.
Tim, could this be a regression from bug 1231701?
Flags: needinfo?(timdream)
Bug 1231701 did not land on Firefox for Android so it's unlikely the cause. It would be great if someone could use the remote debugger to figure out which font Gecko selects (incorrectly).
Flags: needinfo?(timdream)
Sure. Interestingly, remote debugging in both 49 and 53/nightly reveals the same values.

The console gives this for one of the <p> elements (which has 'style="font-family:Segoe UI Emoji; font-size:3.5em"'):
>getComputedStyle(elem, null).getPropertyValue("font-family")
>>Segoe UI Emoji

The fonts panel in devtools shows these system fonts:
>Clear Sans
>Droid Sans Fallback
>Noto Color Emoji
>SamsungEmoji
See Also: → 1326365
Duplicate of this bug: 1326365
[Tracking Requested - why for this release]:
Graphical regression on major site (Twitter).
=====

This affects twitter, too (which I initially filed independently as bug 1326365).  See screenshots on that bug. Sample affected URL: https://mobile.twitter.com/rizmc/status/813726874941558784

mozregression (using my OnePlus One phone & CyanogenMod 13 / Android 6) says this is a regression from bug 725119. Requesting tracking, since this is a serious graphical regression on a major site, which we're about to ship in 51.
Flags: needinfo?(lsalzman)
See Also: 1326365
Summary: Emoji no longer appearing on getemoji.com → Emoji no longer appearing on getemoji.com and twitter.com, on Android
platform-rel: --- → ?
Whiteboard: webcompat → webcompat [platform-rel-Twitter]
Version: unspecified → 51 Branch
The main problem for Android is that we always defaulted the embedded bitmap flag to off. On Linux we had a similar issue, though Fontconfig was supposed to get involved to override that.

I went and investigated what cairo-ft actually does and tried to match it as best as we can, so that both appearance and metrics line up again. So cairo-ft does:

1) On Android without fontconfig, never disable bitmaps.
2) On Linux with fontconfig, it is a bit inane. It only ever disables bitmaps if AA is enabled, and then only if embeddedbitmap was not explicitly assigned true. So without AA, it always leaves bitmaps enabled.

In the future when we are no longer bound by matching Cairo, we probably want saner parsing of embeddedbitmap, but for now, we match Cairo again and emoji will show up now.
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Flags: needinfo?(lsalzman)
Attachment #8822811 - Flags: review?(jfkthame)
... Better version of the above patch.

This one makes the decision to disable bitmaps depend only on the fontconfig AA setting, not on our user-supplied AA overrides. This is yet closer to how Cairo behaves. It should increase consistency and prevent some possible accidents where bitmaps would show up in some cases but not others depending on whether we internally allowed AA or not regardless of what fontconfig wanted.
Attachment #8822811 - Attachment is obsolete: true
Attachment #8822811 - Flags: review?(jfkthame)
Attachment #8822816 - Flags: review?(jfkthame)
Attachment #8822816 - Flags: review?(jfkthame) → review+
Please also nominate this for uplift as soon as it's safely landed and confirmed to fix the issue.
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/277613c55806
make SkFontHost_cairo match cairo-ft's handling of FcPattern embeddedbitmap option. r=jfkthame
https://hg.mozilla.org/mozilla-central/rev/277613c55806
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Daniel, can you verify if this issue is now fixed?
Flags: needinfo?(dholbert)
I can verify that the sample URLs are showing emoji again on my Android devices in today's nightly.
Seems fixed to me as well, using https://mobile.twitter.com/rizmc/status/813726874941558784 and http://getemoji.com/ , in today's Android Nightly. Thanks!

Kicking needinfo back over to Lee for backport approvals.
platform-rel: ? → ---
Flags: needinfo?(dholbert) → needinfo?(lsalzman)
Posted image swarm.png
I am seeing this on swarm year in review page (I think it is the same issue) and it is fixed in Nightly indeed, Beta still affected. I will be waiting for uplifts and check again. 
Link: https://t.co/JR5S5EcCbr
Comment on attachment 8822816 [details] [diff] [review]
make SkFontHost_cairo match cairo-ft's handling of FcPattern embeddedbitmap option

Approval Request Comment
[Feature/Bug causing the regression]: bug 725119, 51+
[User impact if declined]: Emoji fail to show up on Android and Linux.
[Is this code covered by automated tests?]: no
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: no 
[List of other uplifts needed for the feature/fix]: aurora, beta
[Is the change risky?]: no
[Why is the change risky/not risky?]: Small change to how fonts are loaded that should make us match our retired Cairo content rendering backend.
[String changes made/needed]: None
Flags: needinfo?(lsalzman)
Attachment #8822816 - Flags: approval-mozilla-beta?
Attachment #8822816 - Flags: approval-mozilla-aurora?
Comment on attachment 8823390 [details] [diff] [review]
add reftest to verify that color emoji show up

Review of attachment 8823390 [details] [diff] [review]:
-----------------------------------------------------------------

This may need to be special case to only pass on platforms that have color emoji fonts.
Attachment #8823390 - Flags: review?(jmuizelaar) → review+
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c207c957193
add reftest to verify that color emoji show up. r=jrmuizel
Comment on attachment 8822816 [details] [diff] [review]
make SkFontHost_cairo match cairo-ft's handling of FcPattern embeddedbitmap option

fix recent regression for emojis on android, take in aurora52
Attachment #8822816 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Sylvestre, can you get this uplifted to beta soon? Otherwise as of 51 release we will have broken emoji everywhere on Android...
Flags: needinfo?(sledru)
Can't have twitter without emojis
Flags: needinfo?(sledru) → needinfo?(lhenry)
Comment on attachment 8822816 [details] [diff] [review]
make SkFontHost_cairo match cairo-ft's handling of FcPattern embeddedbitmap option

Let's land this for the beta 13 build today.
Flags: needinfo?(lhenry)
Attachment #8822816 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Verified as fixed on all branches (Nightly 53.0a1/10.01, Aurora 52.0a2/11.01 and Beta 51.0b13) on a Nexus 9 (Android 6.0.2) and on a Xiaomi mi i4 (Android 5.0.2).
platform-rel: --- → +
Track 51+ as regression related to emoji.
Depends on: 1330972
On this one http://www.get-emoji.com/ , it seems that the emoji appear.
On a Samsung galaxy S4 , android version 5.0.1
You need to log in before you can comment on or make changes to this bug.