Closed Bug 1318769 Opened 6 years ago Closed 6 years ago

Emoji no longer appearing on and, on Android


(Firefox for Android Graveyard :: General, defect)

51 Branch
Not set


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

Firefox 53
Tracking Status
platform-rel --- +
firefox51 + verified
firefox52 --- verified


(Reporter: wisniewskit, Assigned: lsalzman)




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


(3 files, 1 obsolete file)

In version 49, emoji appear on 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
See Also: → 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:

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 → Emoji no longer appearing on and, 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
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
make SkFontHost_cairo match cairo-ft's handling of FcPattern embeddedbitmap option. r=jfkthame
Closed: 6 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 and , in today's Android Nightly. Thanks!

Kicking needinfo back over to Lee for backport approvals.
platform-rel: ? → ---
Flags: needinfo?(dholbert) → needinfo?(lsalzman)
Attached 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. 
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
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.
On this one , it seems that the emoji appear.
On a Samsung galaxy S4 , android version 5.0.1
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.