[html5] r3537 - [gw] (2) Clarify how context.font works regarding relative values for font-size.

whatwg at whatwg.org whatwg at whatwg.org
Tue Aug 4 16:34:50 PDT 2009


Author: ianh
Date: 2009-08-04 16:34:49 -0700 (Tue, 04 Aug 2009)
New Revision: 3537

Modified:
   index
   source
Log:
[gw] (2) Clarify how context.font works regarding relative values for font-size.

Modified: index
===================================================================
--- index	2009-08-04 23:23:39 UTC (rev 3536)
+++ index	2009-08-04 23:34:49 UTC (rev 3537)
@@ -24670,8 +24670,8 @@
     the CSS 'font' property; values that cannot be parsed as CSS font
     values are ignored.</p>
 
-    <p>Relative keywords and lengths are computed relative to the
-    default font, 10px sans-serif.</p>
+    <p>Relative keywords and lengths are computed relative to the font
+    of the <code><a href=#the-canvas-element>canvas</a></code> element.</p>
 
    </dd>
 
@@ -24733,10 +24733,10 @@
   property of CSS (but without supporting property-independent
   stylesheet syntax like 'inherit'), and the resulting font must be
   assigned to the context, with the 'line-height' component forced to
-  'normal'. If the new value is syntactically incorrect (including
-  using property-independent stylesheet syntax like 'inherit' or
-  'initial'), then it must be ignored, without assigning a new font
-  value. <a href=#refsCSS>[CSS]</a></p>
+  'normal', and with the 'font-size' component converted to CSS
+  pixels. If the new value is syntactically incorrect (including using
+  property-independent stylesheet syntax like 'inherit' or 'initial'),
+  then it must be ignored, without assigning a new font value. <a href=#refsCSS>[CSS]</a></p>
 
   <p>Font names must be interpreted in the context of the
   <code><a href=#the-canvas-element>canvas</a></code> element's stylesheets; any fonts embedded using
@@ -24750,8 +24750,9 @@
   make the font look very ugly.</p>
 
   <p>On getting, the <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code>
-  attribute must return the serialized form of the current font of the
-  context (with no 'line-height' component). <a href=#refsCSSOM>[CSSOM]</a></p>
+  attribute must return the <span title="serializing a CSS
+  value">serialized form</span> of the current font of the context
+  (with no 'line-height' component). <a href=#refsCSSOM>[CSSOM]</a></p>
 
   <div class=example>
 

Modified: source
===================================================================
--- source	2009-08-04 23:23:39 UTC (rev 3536)
+++ source	2009-08-04 23:34:49 UTC (rev 3537)
@@ -26945,8 +26945,8 @@
     the CSS 'font' property; values that cannot be parsed as CSS font
     values are ignored.</p>
 
-    <p>Relative keywords and lengths are computed relative to the
-    default font, 10px sans-serif.</p>
+    <p>Relative keywords and lengths are computed relative to the font
+    of the <code>canvas</code> element.</p>
 
    </dd>
 
@@ -27014,10 +27014,11 @@
   property of CSS (but without supporting property-independent
   stylesheet syntax like 'inherit'), and the resulting font must be
   assigned to the context, with the 'line-height' component forced to
-  'normal'. If the new value is syntactically incorrect (including
-  using property-independent stylesheet syntax like 'inherit' or
-  'initial'), then it must be ignored, without assigning a new font
-  value. <a href="#refsCSS">[CSS]</a></p>
+  'normal', and with the 'font-size' component converted to CSS
+  pixels. If the new value is syntactically incorrect (including using
+  property-independent stylesheet syntax like 'inherit' or 'initial'),
+  then it must be ignored, without assigning a new font value. <a
+  href="#refsCSS">[CSS]</a></p>
 
   <p>Font names must be interpreted in the context of the
   <code>canvas</code> element's stylesheets; any fonts embedded using
@@ -27032,8 +27033,9 @@
   make the font look very ugly.</p>
 
   <p>On getting, the <code title="dom-context-2d-font">font</code>
-  attribute must return the serialized form of the current font of the
-  context (with no 'line-height' component). <a
+  attribute must return the <span title="serializing a CSS
+  value">serialized form</span> of the current font of the context
+  (with no 'line-height' component). <a
   href="#refsCSSOM">[CSSOM]</a></p>
 
   <div class="example">




More information about the Commit-Watchers mailing list