|
@@ -1185,6 +1185,12 @@ |
|
|
<li><p>If <var title="">position</var> is past the end of <var |
|
|
title="">input</var>, return an error.</p></li> |
|
|
|
|
|
<li><p>If the next character is a U+002B PLUS SIGN character (+), |
|
|
advance <var title="">position</var> to the next character.</li> |
|
|
|
|
|
<li><p>If <var title="">position</var> is past the end of <var |
|
|
title="">input</var>, return an error.</p></li> |
|
|
|
|
|
<li><p>If the next character is not one of U+0030 DIGIT ZERO (0) |
|
|
.. U+0039 DIGIT NINE (9), then return an error.</p></li> |
|
|
|
|
|
|
|
|
|
|
<hr> |
|
|
|
|
|
<p class="XXX">...font...</p> |
|
|
<!-- face=>font-family --> |
|
|
<!-- pointsize=>font-size as pt if present; |
|
|
otherwise size=>font-size as follows: |
|
|
int <0: as x-small |
|
|
int >7: as xx-large |
|
|
1,2,3,4,5,6: as x-small,small,medium,large,x-large,xx-large; quirks offsets by one? |
|
|
-6 .. -0 +0 .. +6: add to <basefont size> and treat as above? |
|
|
what values should x-small..xx-large have? |
|
|
--> |
|
|
<!-- color --> |
|
|
<p>When a <code>font</code> element has a <code |
|
|
title="attr-font-color">color</code> attribute, its value is |
|
|
expected to be parsed using the <span>rules for parsing a legacy |
|
|
color value</span>, and the user agent is expected to treat the |
|
|
attribute as a <span title="presentational hints">presentational |
|
|
hint</span> setting the element's 'color' property to the resulting |
|
|
color.</p> |
|
|
|
|
|
<p>When a <code>font</code> element has a <code |
|
|
title="attr-font-face">face</code> attribute, the user agent is |
|
|
expected to treat the attribute as a <span title="presentational |
|
|
hints">presentational hint</span> setting the element's |
|
|
'font-family' property to the attribute's value.</p> |
|
|
|
|
|
<p>When a <code>font</code> element has a <code |
|
|
title="attr-font-pointsize">pointsize</code> attribute, the user |
|
|
agent is expected to parse that attribute's value using the |
|
|
<span>rules for parsing non-negative integers</span>, and if this |
|
|
doesn't generate an error, then the user agent is expected to use |
|
|
the parsed value as a <em>point</em> length for a <span |
|
|
title="presentational hints">presentational hint</span> for the |
|
|
'font-size' property on the element.</p> |
|
|
|
|
|
<p>When a <code>font</code> element has a <code |
|
|
title="attr-font-size">size</code> attribute, the user agent is |
|
|
expected to use the following steps to treat the attribute as a |
|
|
<span title="presentational hints">presentational hint</span> |
|
|
setting the element's 'font-size' property:</p> |
|
|
|
|
|
<ol> |
|
|
|
|
|
<li><p>Let <var title="">input</var> be the attribute's |
|
|
value.</p></li> |
|
|
|
|
|
<li><p>Let <var title="">position</var> be a pointer into <var |
|
|
title="">input</var>, initially pointing at the start of the |
|
|
string.</p></li> |
|
|
|
|
|
<li><p><span>Skip whitespace</span>.</p></li> |
|
|
|
|
|
<li><p>If <var title="">position</var> is past the end of <var |
|
|
title="">input</var>, there is no <span title="presentational |
|
|
hints">presentational hint</span>. Abort these steps.</p></li> |
|
|
|
|
|
<li><p>If the character at <var title="">position</var> is a U+002B |
|
|
PLUS SIGN character (+), then let <var title="">mode</var> be |
|
|
<i>relative-plus</i>, and advance <var title="">position</var> to |
|
|
the next character. Otherwise, if the character at <var |
|
|
title="">position</var> is a U+002D HYPHEN-MINUS character (-), |
|
|
then let <var title="">mode</var> be <i>relative-minus</i>, and |
|
|
advance <var title="">position</var> to the next |
|
|
character. Otherwise, let <var title="">mode</var> be |
|
|
<i>absolute</i>.</p></li> |
|
|
|
|
|
<li><p><span>Collect a sequence of characters</span> in the range |
|
|
U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), and let the |
|
|
resulting sequence be <var title="">digits</var>.</p></li> |
|
|
|
|
|
<li><p>If <var title="">digits</var> is the empty string, there is |
|
|
no <span title="presentational hints">presentational |
|
|
hint</span>. Abort these steps.</p></li> |
|
|
|
|
|
<li><p>Interpret <var title="">digits</var> as a base-ten |
|
|
integer. Let <var title="">size</var> be the resulting |
|
|
number.</p></li> |
|
|
|
|
|
<li> |
|
|
|
|
|
<p>If <var title="">mode</var> is not <i>absolute</i>, run these |
|
|
substeps:</p> |
|
|
|
|
|
<ol> |
|
|
|
|
|
<li><p>Let <var title="">base</var> be 3.</p></li> |
|
|
|
|
|
<li><p>Let <var title="">base element</var> be the the last |
|
|
<code>basefont</code> element in <span>tree order</span> that is |
|
|
before the <code>font</code> element, if there is one.</p></li> |
|
|
|
|
|
<li><p>If there is a <var title="">base element</var>, and it has |
|
|
a <code title="attr-basefont-size">size</code> attribute, then |
|
|
apply the <span>rules for parsing non-negative integers</span> to |
|
|
that attribute's value.</p></li> |
|
|
|
|
|
<li><p>If <var title="">base</var> is greater than 7, let it be |
|
|
7.</p></li> |
|
|
|
|
|
<li><p>If <var title="">base</var> is less than 1, let it be |
|
|
1.</p></li> |
|
|
|
|
|
<li><p>If <var title="">mode</var> is <i>relative-plus</i>, then |
|
|
increment <var title="">value</var> by <var |
|
|
title="">base</var>. Otherwise, decrement <var |
|
|
title="">value</var> by <var title="">base</var>.</p></li> |
|
|
|
|
|
</ol> |
|
|
|
|
|
</li> |
|
|
|
|
|
<li><p>If <var title="">value</var> is greater than 7, let it be |
|
|
7.</p></li> |
|
|
|
|
|
<li><p>If <var title="">value</var> is less than 1, let it be |
|
|
1.</p></li> |
|
|
|
|
|
<li> |
|
|
|
|
|
<p>Set 'font-size' to the keyword corresponding to the value of |
|
|
<var title="">value</var> according to the following table:</p> |
|
|
|
|
|
<table> |
|
|
<thead> |
|
|
<tr> |
|
|
<th><var title="">value</var> |
|
|
<th>'font-size' keyword |
|
|
<th>Notes |
|
|
<tbody> |
|
|
<tr> |
|
|
<td>1 |
|
|
<td>xx-small |
|
|
<td> |
|
|
<tr> |
|
|
<td>2 |
|
|
<td>small |
|
|
<td> |
|
|
<tr> |
|
|
<td>3 |
|
|
<td>medium |
|
|
<td> |
|
|
<tr> |
|
|
<td>4 |
|
|
<td>large |
|
|
<td> |
|
|
<tr> |
|
|
<td>5 |
|
|
<td>x-large |
|
|
<td> |
|
|
<tr> |
|
|
<td>6 |
|
|
<td>xx-large |
|
|
<td> |
|
|
<tr> |
|
|
<td>7 |
|
|
<td>xxx-large |
|
|
<td><i>see below</i> |
|
|
</table> |
|
|
|
|
|
<p>The 'xxx-large' value is a non-CSS value used here to indicate |
|
|
a font size one "step" larger than 'xx-large'.</p> |
|
|
|
|
|
</li> |
|
|
|
|
|
</ol> |
|
|
|
|
|
|
|
|
<h4>Punctuation and decorations</h4> |