Skip to content

Commit 17da2bb

Browse files
[css-fonts-4] Call Fetch directly for @font-face loads
This change makes the CSS Fonts spec call directly into the Fetch spec when specifying the requirements for loading fonts from @font-face rules. Otherwise, without this change, the CSS Fonts spec references “potentially CORS-enabled fetch”, which is an obsolete algorithm that no longer exists either in the Fetch spec nor in HTML.
1 parent 2b501f0 commit 17da2bb

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

css-fonts-4/Overview.bs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ spec:css-color-4; type:property; text:color
2424
spec:css-values; type:value; text:ex
2525
spec:css22; type:value; for:/; text:block
2626
spec:html; type:element; text:font
27+
spec:fetch; type:dfn; for:/; text:request
28+
spec:fetch; type:dfn; for:/; text:fetch
2729
</pre>
2830

2931

@@ -2698,21 +2700,18 @@ downloadable fonts to avoid large page reflows where possible.
26982700
<h4 id="font-fetching-requirements" oldids="same-origin-restriction,allowing-cross-origin-font-loading">
26992701
Font fetching requirements</h4>
27002702

2701-
For font loads, user agents must use the
2702-
<a href="https://fetch.spec.whatwg.org/#fetching">potentially CORS-enabled fetch</a>
2703-
method defined by the [[!HTML]] specification for URL's defined
2704-
within @font-face rules. When fetching, user agents must use
2705-
"Anonymous" mode, set the referrer source to the stylesheet's URL and
2706-
set the origin to the URL of the containing document.
2703+
For font loads from @font-face rules, user agents must create a <a>request</a>
2704+
whose <var>url</var> is the URL given by the @font-face rule, whose <var>referrer</var>
2705+
is the stylesheet's URL, and whose <var>origin</var> is the URL of the containing document.
27072706

27082707
Note: The implications of this for authors are that fonts
27092708
will typically not be loaded cross-origin unless authors specifically
27102709
takes steps to permit cross-origin loads. Sites can explicitly allow
27112710
cross-site loading of font data using the <code>Access-Control-Allow-Origin</code>
27122711
HTTP header. For other schemes, no explicit mechanism to allow
27132712
cross-origin loading, beyond what is permitted by the
2714-
<a href="https://fetch.spec.whatwg.org/#fetching">potentially CORS-enabled fetch</a>
2715-
method, is defined or required.
2713+
<a>fetch</a>
2714+
algorithm, is defined or required.
27162715

27172716
<div class="example">
27182717
For the examples given below, assume that a document is located at

0 commit comments

Comments
 (0)