@@ -322,15 +322,8 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
322322 < li > < a href ="#font-face-loading "> < span class =secno > 4.8 </ span > Font
323323 loading guidelines</ a >
324324
325- < li > < a href ="#same-origin-restriction "> < span class =secno > 4.9
326- </ span > Same-origin restriction for fonts</ a >
327- < ul class =toc >
328- < li > < a href ="#default-same-origin-restriction "> < span class =secno > 4.9.1
329- </ span > Default same-origin restriction</ a >
330-
331- < li > < a href ="#allowing-cross-origin-font-loading "> < span
332- class =secno > 4.9.2 </ span > Allowing cross-origin font loading</ a >
333- </ ul >
325+ < li > < a href ="#font-fetching-requirements "> < span class =secno > 4.9
326+ </ span > Font fetching requirements</ a >
334327 </ ul >
335328
336329 < li > < a href ="#font-matching-algorithm "> < span class =secno > 5 </ span > Font
@@ -3021,56 +3014,16 @@ <h3 id=font-face-loading><span class=secno>4.8 </span>Font loading
30213014 that closely match the metrics of the downloadable fonts to avoid large
30223015 page reflows where possible.
30233016
3024- < h3 id =same-origin-restriction > < span class = secno > 4.9 </ span > Same-origin
3025- restriction for fonts </ h3 >
3017+ < p > < a id =same-origin-restriction > </ a > < a
3018+ id = allowing-cross-origin-font-loading > </ a >
30263019
3027- < h4 id =default-same-origin-restriction > < span class =secno > 4.9.1
3028- </ span > Default same-origin restriction </ h4 >
3020+ < h3 id =font-fetching-requirements > < span class =secno > 4.9 </ span > Font
3021+ fetching requirements </ h3 >
30293022 <!-- TPAC 2011 Resolution to require same-origin restriction for loading fonts:
30303023 http://lists.w3.org/Archives/Public/www-style/2011Nov/0711.html
30313024 http://www.w3.org/2011/10/31-webapps-minutes.html#item02
30323025-->
30333026
3034- < p > User agents must implement a same-origin restriction when loading fonts
3035- via the < a href ="#at-font-face-rule "> < code > @font-face</ code > </ a >
3036- mechanism. This restriction limits the loading of fonts for a given
3037- document to fonts loaded from the same origin. Fonts can only be loaded
3038- via the same host, port, and method combination as the containing
3039- document, using the < a
3040- href ="http://www.w3.org/TR/html5/browsers.html#origin "> origin matching
3041- algorithm</ a > described in the < a href ="#HTML5 "
3042- rel =biblioentry > [HTML5]<!--{{!HTML5}}--> </ a > specification. The origin of
3043- the stylesheet containing < a
3044- href ="#at-font-face-rule "> < code > @font-face</ code > </ a > rules is not used
3045- when deciding whether a font is same origin or not, only the origin of the
3046- containing document is used. The restriction applies to all font types.
3047-
3048- < p > Given a document located at http://example.com/page.html, fonts defined
3049- with ‘< a href ="#descdef-src "> < code class =property > src</ code > </ a > ’
3050- definitions considered cross origin must not be loaded:
3051-
3052- < pre >
3053- /* same origin (i.e. domain, scheme, port match document) */
3054- src: url(fonts/simple.woff);
3055- src: url(//fonts/simple.woff);
3056-
3057- /* cross origin, different scheme */
3058- src: url(https://example.com/fonts/simple.woff);
3059-
3060- /* cross origin, different domain */
3061- src: url(http://another.example.com/fonts/simple.woff);
3062- </ pre >
3063-
3064- < h4 id =allowing-cross-origin-font-loading > < span class =secno > 4.9.2
3065- </ span > Allowing cross-origin font loading</ h4 >
3066-
3067- < p > User agents must also implement the ability to relax this restriction
3068- using cross-site origin controls < a href ="#CORS "
3069- rel =biblioentry > [CORS]<!--{{!CORS}}--> </ a > for fonts loaded via HTTP.
3070- Sites can explicitly allow cross-site downloading of font data using the
3071- < code > Access-Control-Allow-Origin</ code > HTTP header. For other schemes,
3072- no explicit relaxation mechanism is defined or required.
3073-
30743027 < p > For font loads, user agents must use the < a
30753028 href ="http://www.w3.org/TR/html5/infrastructure.html#cors-enabled-fetch "> potentially
30763029 CORS-enabled fetch</ a > method defined by the < a href ="#HTML5 "
@@ -3079,6 +3032,15 @@ <h4 id=allowing-cross-origin-font-loading><span class=secno>4.9.2
30793032 "Anonymous" mode, set the referrer source to the stylesheet's URL and set
30803033 the origin to the URL of the containing document.
30813034
3035+ < p class =note > The implications of this for authors are that fonts will
3036+ typically not be loaded cross-origin unless authors specifically takes
3037+ steps to permit cross-origin loads. Sites can explicitly allow cross-site
3038+ loading of font data using the < code > Access-Control-Allow-Origin</ code >
3039+ HTTP header. For other schemes, no explicit mechanism to allow
3040+ cross-origin loading beyond what is permitted by the < a
3041+ href ="http://www.w3.org/TR/html5/infrastructure.html#cors-enabled-fetch "> potentially
3042+ CORS-enabled fetch</ a > method is defined or required.
3043+
30823044 < h2 id =font-matching-algorithm > < span class =secno > 5 </ span > Font Matching
30833045 Algorithm</ h2 >
30843046
0 commit comments