@@ -2025,37 +2025,63 @@ The <dfn id="at-font-face-rule">''@font-face''</dfn> rule</h3>
20252025
20262026<h4 id="font-face-src-parsing">Parsing the 'src!!descriptor' descriptor</h4>
20272027
2028+ The 'src!!descriptor' descriptor value must be parsed
2029+ according to section [[css-syntax#parse-comma-separated-list-of-component-values]] .
2030+ Then each component value is parsed according to this grammar:
20282031
2029- The 'src!!descriptor' descriptor value must be parsed
2030- according to section [[css-syntax#parse-comma-separated-list-of-component-values]] .
2031- Then each component value is parsed according to this grammar:
20322032
2033+ <pre> <<url>> [ format(<<font-format>> [supports <<font-technology>>#] ?)]? | local(<<font-face-name>> )</pre>
20332034
2034- <pre> <<url>> [ format(<<font-format>> [supports <<font-technology>>#] ?)]? | local(<<font-face-name>> )</pre>
2035+ <pre class="prod"><dfn id="font-format-values"><font-format></dfn>
2036+ = [<<string>> | woff | truetype | opentype
2037+ | woff2 | embedded-opentype | collection | svg]</pre>
20352038
2036- <pre class="prod"><dfn id="font-format-values"><font-format></dfn> = [<<string>> | woff | truetype | opentype | woff2 | embedded-opentype | collection | svg]</pre>
2039+ <pre class="prod"><dfn id="font-technology-values"><font-technology></dfn>
2040+ = [features(<<font-feature-technology>> ) | variations
2041+ | color(<<color-font-technology>> ) | palettes
2042+ | incremental ]</pre>
20372043
2038- <pre class="prod"><dfn id="font-technology-values"><font-technology></dfn>
2039- = [features( <<font-feature-technology>> ) | variations | color( <<color-font-technology>> ) | palettes ]</pre>
2044+ <pre class="prod"><dfn id="font-feature- technology-values"><font-feature -technology></dfn>
2045+ = [opentype | aat | graphite ]</pre>
20402046
2041- <pre class="prod"><dfn id="font-feature- technology-values"><font-feature -technology></dfn>
2042- = [opentype | aat | graphite ]</pre>
2047+ <pre class="prod"><dfn id="color- font-technology-values"><color-font -technology></dfn>
2048+ = [COLRv0 | COLRv1 | SVG | sbix | CBDT ]</pre>
20432049
2044- <pre class="prod"><dfn id="color-font-technology-values"><color-font-technology></dfn>
2045- = [COLRv0 | COLRv1 | SVG | sbix | CBDT ]</pre>
2050+ If a component value is parsed correctly
2051+ and is of a format and font technology that the UA supports,
2052+ add it to the list of supported sources.
2053+ If parsing a component value results in a parsing error
2054+ or its format or technology are unsupported,
2055+ do not add it to the list of supported sources.
20462056
2047- If a component value is parsed correctly
2048- and is of a format and font technology that the UA supports,
2049- add it to the list of supported sources.
2050- If parsing a component value results in a parsing error
2051- or its format or technology are unsupported,
2052- do not add it to the list of supported sources.
2057+ If there are no supported entries at the end of this process,
2058+ the value for the 'src!!descriptor' descriptor is a parse error.
20532059
2054- If there are no supported entries at the end of this process,
2055- the value for the 'src!!descriptor' descriptor is a parse error.
2060+ These parsing rules allow for graceful fallback of fonts
2061+ for user agents which don't support a particular font technology.
2062+
2063+ <div class="example" id="ex-incremental">
2064+ For example,
2065+ when incremental transfer is not supported,
2066+ a woff2 compressed version of the font
2067+ is supplied,
2068+ for optimal performance.
2069+ Then,
2070+ for incremental transfer using the
2071+ <a href="https://www.w3.org/TR/2020/NOTE-PFE-evaluation-20201015/#range-request">range-request method</a> ,
2072+ the raw uncompressed OpenType font is provided
2073+ so that the client
2074+ can perform byte range requests.
2075+
2076+ <pre>
2077+ @font-face {
2078+ font-family: "MyIncrementallyLoadedWebFont";
2079+ src: url("FallbackURLForBrowsersWhichDontSupportIncrementalLoading.woff2") format("woff2");
2080+ src: url("MyIncrementallyLoadedWebFont.otf") format(opentype supports incremental);
2081+ }
2082+ </pre>
2083+ </div>
20562084
2057- These parsing rules allow for graceful fallback of fonts
2058- for user agents which don't support a particular font technology.
20592085
20602086<h4 id="font-face-src-loading">Loading an individual item in the 'src!!descriptor' descriptor</h4>
20612087
@@ -7209,6 +7235,7 @@ Changes
72097235<h3 id="changes-2021-07-29">Changes from the <a href="https://www.w3.org/TR/2021/WD-css-fonts-4-20210729/">29 July 2021 Working Draft</a> </h3>
72107236
72117237<ul>
7238+ <li> Added incremental font technology to supports</li>
72127239 <li> Reduced the critical angle for oblique font matching from 20deg to 11deg, per WG resolution</li>
72137240 <li> Allowed font-display in @font-feature-values (the prose allowed it but the grammar did not)</li>
72147241</ul>
0 commit comments