csswg/css3-fonts Fonts.html,1.50,1.51

Update of /sources/public/csswg/css3-fonts
In directory hutz:/tmp/cvs-serv6503

Modified Files:
	Fonts.html 
Log Message:
added font downloading guidelines

Index: Fonts.html
===================================================================
RCS file: /sources/public/csswg/css3-fonts/Fonts.html,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- Fonts.html	23 Mar 2011 15:38:46 -0000	1.50
+++ Fonts.html	24 Mar 2011 03:22:58 -0000	1.51
@@ -285,6 +285,9 @@
 
      <li><a href="#font-rend-desc"><span class=secno>4.6 </span>Font
       features: the font-variant and font-feature-settings descriptors</a>
+
+     <li><a href="#font-face-loading"><span class=secno>4.7 </span>Font
+      loading guidelines</a>
     </ul>
 
    <li><a href="#font-matching-algorithm"><span class=secno>5 </span>Font
@@ -2622,6 +2625,47 @@
    omitted. When multiple font feature descriptors or properties are used,
    the cumulative effect on text rendering is described below.
 
+  <h3 id=font-face-loading><span class=secno>4.7 </span>Font loading
+   guidelines</h3>
+
+  <p>The @font-face rule is designed to allow lazy loading of fonts, fonts
+   are only downloaded when needed for use within a document. A stylesheet
+   can include @font-face rules for a library of fonts of which only a select
+   set are used; user agents must only download those fonts that are referred
+   to within the style rules applicable to a given page. User agents that
+   download all fonts defined in @font-face rules without considering whether
+   those fonts are in fact used within a page are considered non-conformant.
+   In cases where a font might be downloaded in character fallback cases,
+   user agents may download a font if it's listed in a font list but is not
+   actually used for a given text run.
+
+  <pre>
+@font-face {
+  font-family: GeometricModern;
+  src: url(font.ttf);
+}
+
+p {
+  /* font will be downloaded for pages with p elements */
+  font-family: GeometricModern, sans-serif;
+}
+
+h2 {
+  /* font may be downloaded for pages with h2 elements, even if Futura is available locally */
+  font-family: Futura, GeometricModern, sans-serif;
+}
+</pre>
+
+  <p>In cases where textual content is loaded before downloadable fonts are
+   available, user agents may render text as it would be rendered if
+   downloadable font resources are not available or they may render text
+   transparently with fallback fonts to avoid a flash of text using a
+   fallback font. In cases where the font download fails user agents must
+   display text, simply leaving transparent text is considered non-conformant
+   behavior. Authors are advised to use fallback fonts in their font lists
+   that closely match the vertical metrics of the downloadable fonts to avoid
+   large page reflows where possible.
+
   <h2 id=font-matching-algorithm><span class=secno>5 </span>Font matching
    algorithm</h2>
 

Received on Thursday, 24 March 2011 03:23:03 UTC