Support for @font-face src: descriptor's "tech(...)" syntax
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: drott, Assigned: jfkthame)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.39 Safari/537.36
Steps to reproduce:
FF drops @font-face src: lines which contain "supports ..." stances in their src: line. The CSS Fonts spec lists parsing rules for the src: line:
https://drafts.csswg.org/css-fonts/#font-face-src-parsing
which explain that the expected behaviour is to parse and analyse entries of the src: line according to the following grammar (excerpt)
<url> [ format(<font-format> [supports <font-technology>#]?)]? | local(<font-face-name>)
<font-format> = [<string> | woff | truetype | opentype | woff2 | embedded-opentype | collection | svg]
<font-technology> = [features | variations | color(<color-font-technology>) | palettes]
and then dropping entries which specify an unsupported format or technology but are considered syntactically correct.
Related issue for parsing issues for format() keywords instead of strings is issue 650372.
Actual results:
FF drops the complete src: line.
Expected results:
FF should understand the supports keyword and the listed technologies including color(...) and drop entries which reference a font with unsupported technologies.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Assignee | ||
Comment 5•2 years ago
|
||
Updating the bug title to reflect the current spec: CSS Fonts 4 has evolved such that instead of supports <font-technology>
within the format()
function, there's now a separate tech()
function that takes keywords such as variations
, color-COLRv1
, etc.
Assignee | ||
Comment 6•2 years ago
|
||
WPT tests to be added in a following patch.
Updated•2 years ago
|
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D154399
Assignee | ||
Comment 8•2 years ago
|
||
Dominik, I notice that tech() doesn't yet seem to be implemented in Chrome Canary (or is there a flag I need to set?) -- I wondered if you can say anything about plans here, as it'll be of somewhat limited use until it is more widely supported.
Reporter | ||
Comment 9•2 years ago
|
||
Planning to ship this, compare: https://bugs.chromium.org/p/chromium/issues/detail?id=1255685 - and hoping to get to it this quarter.
Comment 10•2 years ago
|
||
Comment 12•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f97705333d4c
https://hg.mozilla.org/mozilla-central/rev/e9dbc71b2f18
Assignee | ||
Updated•2 years ago
|
Comment 15•2 years ago
|
||
FYI Docs work for this can be tracked in https://github.com/mdn/content/issues/19833
Following this going behind a pref in 1786804 all I've done is added to the experimental features and also the browser compatibility data. We follow your lead and add documentation for tech()
once the API stabilizes.
Description
•