Skip to content

Commit

Permalink
[e] (0) Clarify 'font' serialisation.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3515 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 31, 2009
1 parent 04c66be commit 75295a9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
16 changes: 15 additions & 1 deletion index
Expand Up @@ -24662,7 +24662,21 @@ notes on what would need to be defined for dashed lines:

<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. <a href=#refsCSSOM>[CSSOM]</a></p>
context (with no 'line-height' component). <a href=#refsCSSOM>[CSSOM]</a></p>

<div class=example>

<p>For example, after the following statement:</p>

<pre>context.font = 'italic 400 12px/2 Unknown Font, sans-serif';</pre>

<p>...the expression <code title="">context.font</code> would
evaluate to the string "<code title="">italic&nbsp;12px&nbsp;Unknown&nbsp;Font,&nbsp;sans-serif</code>". The
"400" font-weight doesn't appear because that is the default
value. The line-height doesn't appear because it is forced to
"normal", the default value.</p>

</div>

<p>When the context is created, the font of the context must be set
to 10px sans-serif. When the 'font-size' component is set to lengths
Expand Down
18 changes: 17 additions & 1 deletion source
Expand Up @@ -26938,7 +26938,23 @@ notes on what would need to be defined for dashed lines:

<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. <a href="#refsCSSOM">[CSSOM]</a></p>
context (with no 'line-height' component). <a
href="#refsCSSOM">[CSSOM]</a></p>

<div class="example">

<p>For example, after the following statement:</p>

<pre>context.font = 'italic 400 12px/2 Unknown Font, sans-serif';</pre>

<p>...the expression <code title="">context.font</code> would
evaluate to the string "<code
title="">italic&nbsp;12px&nbsp;Unknown&nbsp;Font,&nbsp;sans-serif</code>". The
"400" font-weight doesn't appear because that is the default
value. The line-height doesn't appear because it is forced to
"normal", the default value.</p>

</div>

<p>When the context is created, the font of the context must be set
to 10px sans-serif. When the 'font-size' component is set to lengths
Expand Down

0 comments on commit 75295a9

Please sign in to comment.