Closed
Bug 1418818
Opened 7 years ago
Closed 7 years ago
"downloadable font: rejected by sanitizer" for CBDT/CBLC fonts in @font-face (e.g. Noto Color Emoji from Android)
Categories
(Core :: Graphics: Text, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: dandromb, Assigned: jfkthame)
Details
(Whiteboard: [gfx-noted])
Attachments
(2 files, 1 obsolete file)
6.48 MB,
application/zip
|
Details | |
5.58 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171116103757
Steps to reproduce:
- Try to load Noto Color Emoji via @font-face.
(Download font here: https://github.com/googlei18n/noto-emoji/raw/474505eeaf857fed40c048126593e2dfa146a5e8/fonts/NotoColorEmoji.ttf)
Actual results:
I got errors in the Browser Console (Ctrl + Shift + J):
- downloadable font: no supported glyph shapes table(s) present (font-family: "Noto" style:normal weight:normal stretch:normal src index:0) source: file:///home/mint/font-test/NotoColorEmoji.ttf unknown:1:11
- downloadable font: rejected by sanitizer (font-family: "Noto" style:normal weight:normal stretch:normal src index:0) source: file:///home/mint/font-test/NotoColorEmoji.ttf unknown:1:11
Expected results:
Font should load and be displayed.
(CBDT/CBLC fonts were originally spec'd to not allow any outline glyphs or they would be invalid, once upon a time. I'm not sure this is still true in the latest OpenType spec, but Google is still making their emoji font without outlines per the previous version of the CBDT/CBLC spec. Therefore the only major CBDT/CBLC font, "Noto Color Emoji" now errors out in the Firefox web font sanitizer.)
Reporter | ||
Updated•7 years ago
|
Summary: "downloadable font: rejected by sanitizer" for CBDT/CBLC fonts in @font-face (Noto Color Emoji from Android) → "downloadable font: rejected by sanitizer" for CBDT/CBLC fonts in @font-face (e.g. Noto Color Emoji from Android)
Reporter | ||
Comment 1•7 years ago
|
||
This testcase allows quick and easy testing of the reported behavior.
I made testcase.html myself, all other files are taken unmodified from the current master of Noto Emoji at GitHub: https://github.com/googlei18n/noto-emoji/tree/11275b5a2e8295924c335f16e096a60ac48edf90
To test, unzip the archive and open testcase.html in Firefox or any browser to compare with Firefox.
The testcase currently works in Chromium, because they allow CBDT/CBLC fonts with no outline glyphs. Doesn't work in Firefox due to the sanitizer.
Reporter | ||
Updated•7 years ago
|
Has STR: --- → yes
OS: Unspecified → All
Hardware: Unspecified → All
Updated•7 years ago
|
Component: Untriaged → Graphics: Text
Product: Firefox → Core
Reporter | ||
Comment 2•7 years ago
|
||
By the way, here is some testing I did of browser support for color fonts across Windows 10 (updates installed for this month), macOS El Capitan, Ubuntu 18.04 (OS is under heavy development, but I tested with the daily image from earlier this month):
Ubuntu: https://gist.github.com/DeeDeeG/73766eb6edfcee8715ab774be17f5da8
macOS: https://gist.github.com/DeeDeeG/588a7604efe6ddd224301a41eca261e5
Windows 10: https://gist.github.com/DeeDeeG/aa3b5b817a6080e3b2f0fd580858ede7
Shows which formats of color font (i.e. COLR/CPAL, CBLC/CBDT, SBIX, and SVG in OpenType) work in which browsers (i.e. Chrome, Firefox, Safari, Edge, Internet Explorer, Gnome Web, Opera) as well as what errors there are in the devtools console on each browser (if any).
Assignee | ||
Comment 3•7 years ago
|
||
Currently, this is by design: as not all platforms support rendering CBLC/CBDT fonts, they're of limited value as webfonts. We could consider allowing them through the sanitizer, so that they'd work on platforms where the underlying font engine supports them, but that still wouldn't make them work everywhere.
(It's interesting that Edge now supports all these formats, including even Apple's sbix.)
We support COLR/CPAL and SVG-in-OT fonts as webfonts on all platforms, and these are what I'd recommend as preferable technologies for deploying color fonts at this time.
Assignee | ||
Comment 4•7 years ago
|
||
In principle, we could easily enable fonts like this to work via @font-face on platforms where we render with freetype; the patch is trivial. But I'm not convinced that supporting a downloadable font format on only a subset of platforms is altogether a good thing; it may be better to point authors towards the use of more portable options. Milan, WDYT?
Attachment #8933305 -
Flags: feedback?(milan)
This feels like something that I would put behind a preference until we support it on all platforms.
Comment on attachment 8933305 [details] [diff] [review]
Allow downloadable fonts to include CBLC/CBDT tables on platforms where we're using Freetype
Behind a preference, off by default would work for me.
Attachment #8933305 -
Flags: feedback?(milan) → feedback?(jmuizelaar)
Comment 7•7 years ago
|
||
Yeah I agree that we should encourage more portable formats unless we need to support them for compatibility with existing content.
Updated•7 years ago
|
Whiteboard: [gfx-noted]
Assignee | ||
Comment 8•7 years ago
|
||
OK, how about doing this behind a pref, so people who really want it can turn it on, but we won't ship it default-enabled unless/until it works cross-platform?
Attachment #8933606 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•7 years ago
|
Attachment #8933305 -
Attachment is obsolete: true
Attachment #8933305 -
Flags: feedback?(jmuizelaar)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → jfkthame
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Updated•7 years ago
|
Attachment #8933606 -
Flags: review?(jmuizelaar) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/af63906e6f71
Allow downloadable fonts to include CBLC/CBDT tables on platforms where we're using Freetype. r=jrmuizel
Reporter | ||
Comment 10•7 years ago
|
||
Hello all, I just posted an equivalent bug to this, but for SBIX color font support in @font-face. That is bug 1422351.
Comment 11•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•