Closed
Bug 1271536
Opened 8 years ago
Closed 8 years ago
gfxDWriteFontEntry::CopyFontTable() produce different CMAP table for FirefoxEmoji.ttf when loaded as a bundle or remotely
Categories
(Core :: Graphics: Text, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: timdream, Assigned: jfkthame)
References
()
Details
(Whiteboard: gfx-noted)
Attachments
(1 file)
4.16 KB,
patch
|
bas.schouten
:
review+
timdream
:
feedback+
|
Details | Diff | Splinter Review |
With patch from bug 1231701 and with bug 1270878 fixed, Firefox thinks FirefoxEmoji.tff does not come with Emoji characters. This happens on all Windows w/ DWrite font rendering. With breakpoint and observing how the exact same font are being loaded remotely from mozilla.github.io, here [1], so far I can tell cmapLen is 0x0be2 when remotely loaded, and 0x249e when locally loaded. [1] https://dxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxDWriteFontList.cpp#553 (I don't really know if I am on the right track ...) (Originally reported as bug 1270878 comment 3)
Reporter | ||
Updated•8 years ago
|
Updated•8 years ago
|
Whiteboard: gfx-noted
Assignee | ||
Comment 1•8 years ago
|
||
This happens because the code in gfxDWriteFontEntry::CopyFontTable that uses GDI calls to read font table data will fail for bundled fonts, because they're not known to GDI (they haven't been loaded through AddFontResourceExW, as gfxGDIFontList would have done). So I suspect we end up getting font tables from some "random" fallback font such as Arial instead of the correct tables. Yuck! You can confirm this by setting gfx.font_rendering.directwrite.use_gdi_table_loading to false, and restarting the browser; the bundled font should then work properly. I think this is straightforward to fix; just going to test a patch locally.
Assignee: nobody → jfkthame
Assignee | ||
Comment 2•8 years ago
|
||
I believe this should fix the problem you're seeing; works OK in my local testing, at least.
Attachment #8751003 -
Flags: feedback?(timdream)
Reporter | ||
Comment 3•8 years ago
|
||
Comment on attachment 8751003 [details] [diff] [review] Don't try to use GDI table access for bundled fonts when running with the DWrite backend Works locally on Windows 8. Thank you! Pushed to try with other patches: https://treeherder.mozilla.org/#/jobs?repo=try&revision=651b53418aeb
Attachment #8751003 -
Flags: feedback?(timdream) → feedback+
Assignee | ||
Updated•8 years ago
|
Attachment #8751003 -
Flags: review?(bas)
Updated•8 years ago
|
Attachment #8751003 -
Flags: review?(bas) → review+
Assignee | ||
Comment 4•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/37e781ba0cbf5c79c747ac1d6f6da9a640972bdc Bug 1271536 - Don't try to use GDI table access for bundled fonts when running with the DWrite backend. r=bas
Updated•8 years ago
|
Priority: -- → P2
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/37e781ba0cbf
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•