Closed Bug 973380 Opened 6 years ago Closed 6 years ago

missing large chunks of text, triggered by use of a non-scalable (bitmap-only) font


(Core :: Graphics: Text, defect)

Not set



Tracking Status
fennec + ---


(Reporter: jfkthame, Assigned: jfkthame)


(Blocks 1 open bug, )



(1 file)

The Emojipedia site in the URL field shows the problem when viewed on Nexus 10 running Android 4.4.2. (Also on other Nexus models with the same OS version, according to people on irc.)

There's a sidebar on the right of the page (or bottom, for smaller screens) that is supposed to list a bunch of tags, each with a suitable emoji character alongside. The text is almost entirely missing - not only the emoji but most of the tags as well.

Minimal example (for Firefox on Android 4.4.2):


The text completely fails to render.

This happens because of the presence of the bitmap-only Noto Color Emoji font on Android 4.4.2, which gets chosen by font fallback for the emoji charactesr. The code to get font metrics in the gfxFT2Font backend is broken for non-scalable fonts, and ends up with "infinite" ascent/descent values, which result in overflow when computing the frame height, which ends up negative, and so nothing gets displayed.
With this patch, the actual emoji characters still don't show up (as our FreeType build doesn't support the color-bitmap format used), but at least they no longer cause large amounts of the rest of the text to disappear.
Attachment #8376868 - Flags: review?(karlt)
Assignee: nobody → jfkthame
Summary: missing text due triggered by use of a non-scalable (bitmap-only) font → missing large chunks of text, triggered by use of a non-scalable (bitmap-only) font
Attachment #8376868 - Flags: review?(karlt) → review+
Pushed to inbound:

Provided there are no issues with this on trunk, I think we should consider uplifting to earlier releases as well, to get it out to users sooner. The patch is small and extremely contained, with minimal risk of side-effects; and the effect of the bug can be pretty bad (entire lines or blocks of text may go AWOL just because someone included a cute smiley).

Note that the number of users affected will be increasing steadily as people upgrade their Android OS version.
tracking-fennec: --- → ?
Target Milestone: --- → mozilla30
Closed: 6 years ago
Resolution: --- → FIXED
Depends on: 973682
Blocks: 944872
tracking-fennec: ? → +
You need to log in before you can comment on or make changes to this bug.