Closed Bug 1562316 Opened 5 years ago Closed 5 years ago

Reports of emojis not visible while typing text in textbox

Categories

(Core :: Graphics: WebRender, defect, P3)

68 Branch
Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox68 --- disabled
firefox69 --- disabled
firefox70 --- fixed

People

(Reporter: ekager, Assigned: jnicol)

References

Details

Attachments

(1 file)

Working for me here. Pixel 2 running Q.

Seems similar to bug 1502286 which was fixed months ago.

See Also: → 1502286

I can't reproduce this bug in Fenix 1.0.1926 (GV 68.0-20190612114833) on my Moto G5 Plus running Android 8.1.0. I'll ask the original bug reporter on GitHub.

The bug reporter says he can still reproduce this emoji bug using the Google board keyboard on his OnePlus 3T running Android 9.0 Pie:

https://github.com/mozilla-mobile/fenix/issues/3643#issuecomment-508314004

I'm moving this bug to the WebRender component because the bug reporter says the problem is caused by enabling WebRender:

https://github.com/mozilla-mobile/fenix/issues/3643#issuecomment-509966651

Blocks: wr-android
Component: General → Graphics: WebRender
OS: All → Android
Product: GeckoView → Core
Blocks: wr-android-mvp
No longer blocks: wr-android
Flags: needinfo?(jnicol)

Jamie, can you reproduce this?

Yes, I can reproduce. Will have a look.

Assignee: nobody → jnicol
Flags: needinfo?(jnicol)

Lee might also have a guess at what might be happening here.

The reason emojis are visible in tweets on the timeline but not in the text box is that in the timeline they are shown as <img>s, but they are just text in the text box. Same goes for github.

So it seems like emojis simply aren't being rendered ever with webrender on android, nothing text box specific. Confirmed by a simple test page (and comment 8 seems to confirm this too.)

I will follow the code and see if I can find out where it's going wrong, unless Lee can instantly guess?

Priority: -- → P3

We aren't setting the FontInstanceFlags::EMBEDDED_BITMAPS flag in ScaledFontFreeType::GetWRFontInstanceOptions(), so in FontContext::load_glyph() we are forced in to taking the non-bitmap / scalable code path, which fails on android because emojis are bitmap only.

Setting the flag there causes us to take the bitmap / fixed-size path, which succeeds, and emojis are drawn correctly 🙌🙌🙌🎉🎉🎉

ScaledFontFreeType::GetWRFontInstanceOptions() was neglecting to set
the FontInstanceFlags::EMBEDDED_BITMAPS flag. This was causing us to
always take the non-bitmap path when rasterizing the glyph, which
fails on android because emoji fonts are bitmap only. Setting this
flag causes glyphs to be rendered correctly on android webrender.

Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bac526dab75d Fix emoji rendering on android webrender. r=lsalzman
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Regressions: 1570544
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: