Closed Bug 1267180 Opened 8 years ago Closed 8 years ago

Apple Color Emoji font fails to display at large sizes when using Skia content rendering

Categories

(Core :: Graphics: Text, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: the.decryptor, Assigned: mchang)

References

Details

(Whiteboard: gfx-noted)

Attachments

(2 files, 1 obsolete file)

Attached file 4 Pizza slice emojis (obsolete) —
When using Skia content rendering, emoji characters in the Apple Color Emoji font fail to display over a certain size (128px on retina, 256px on non-retina), when using the CoreGraphics backend they show correctly.

In the attached file there should be 4 emoji characters showing, the top row has 2 characters straddling the 128/129px boundary, the bottom row 256/257px. On my retina display only the top left one displays. If I zoom out to 50% then both characters on the top row show, but only the left most one on the bottom row shows.
Attached file Broken emoji
I didn't realize Bugzilla actually forced windows-1252, this should work.
Attachment #8744850 - Attachment is obsolete: true
Blocks: skia-osx
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is because Skia doesn't render some fonts if they are too big. The failure also occurs in Chrome, but not Safari.
Whiteboard: gfx-noted
Assignee: nobody → mchang
Attached patch colorglyph.patchSplinter Review
Big fonts will be rendered as paths[1], and Skia would try to get the path from CG [2], which would return null, so we'd render nothing. This patch tells Skia to draw the glyph as a normal glyph and not a path if it has color glyphs. Also a good possible candidate for upstream as chrome fails too.

[1] https://dxr.mozilla.org/mozilla-central/source/gfx/skia/skia/src/core/SkDraw.cpp?case=true&from=SkDraw.cpp#1412
[2] https://dxr.mozilla.org/mozilla-central/source/gfx/skia/skia/src/ports/SkFontHost_mac.cpp?from=SkFontHost_mac.cpp#1393
Attachment #8746638 - Flags: review?(lsalzman)
Attachment #8746638 - Flags: review?(lsalzman) → review+
https://hg.mozilla.org/mozilla-central/rev/57e54fef9cf2
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Depends on: 1269247
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: