Skip to content

Commit 7f23c8b

Browse files
committed
[css2] Issue 156
from http://wiki.csswg.org/spec/css2.1 --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%403048
1 parent 593ac2e commit 7f23c8b

1 file changed

Lines changed: 25 additions & 15 deletions

File tree

css2/fonts.src

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
22
<html lang="en">
3-
<!-- $Id: fonts.src,v 2.101 2010-08-26 16:44:25 bbos Exp $ -->
3+
<!-- $Id: fonts.src,v 2.102 2010-10-13 15:39:24 bbos Exp $ -->
44
<head>
55
<title>Fonts</title>
66
<meta name="editor" lang="tr" content="Tantek &Ccedil;elik">
@@ -461,31 +461,41 @@ scale in which the value '400' (or 'normal') corresponds to the
461461
that face will typically be <em>Book, Regular, Roman, Normal</em> or
462462
sometimes <em>Medium</em>.
463463
</p>
464+
464465
<p>The association of other weights within a family to the numerical
465466
weight values is intended only to preserve the ordering of darkness
466467
within that family. However, the following heuristics tell how the
467-
assignment is done in typical cases:
468-
</p>
468+
assignment is done in this case:
469+
469470
<ul>
470471
<li>If the font family already uses a numerical scale with nine values
471472
(like e.g., <em>OpenType</em> does), the font weights should be mapped
472473
directly.
473-
</li>
474+
474475
<li>If there is both a face labeled <em>Medium</em> and one labeled
475476
<em>Book, Regular, Roman</em> or <em>Normal,</em> then the
476477
<em>Medium</em> is normally assigned to the '500'.
477-
</li>
478+
478479
<li>The font labeled "Bold" will often correspond to the weight value '700'.
479-
</li>
480-
<li>If there are fewer then 9 weights in the family, the default
481-
algorithm for filling the "holes" is as follows. If '500' is
482-
unassigned, it will be assigned the same font as '400'. If any of the
483-
values '600', '700', '800' or '900' remains unassigned, they are
484-
assigned to the same face as the next darker assigned keyword, if any,
485-
or the next lighter one otherwise. If any of '300', '200' or '100'
486-
remains unassigned, it is assigned to the next lighter assigned
487-
keyword, if any, or the next darker otherwise.
488-
</li>
480+
</ul>
481+
482+
<p>Once the font family's weights are mapped onto the CSS scale,
483+
missing weights are selected as follows:
484+
485+
<ul>
486+
<li>If the desired weight is less than 400, weights below the desired
487+
weight are checked in descending order followed by weights above the
488+
desired weight in ascending order until a match is found.
489+
490+
<li>If the desired weight is greater than 500, weights above desired
491+
weight are checked in ascending order followed by weights below the
492+
desired weight in descending order until a match is found.
493+
494+
<li>If the desired weight is 400, 500 is checked first and then the
495+
rule for desired weights less than 400 is used.
496+
497+
<li>If the desired weight is 500, 400 is checked first and then the
498+
rule for desired weights less than 400 is used.
489499
</ul>
490500

491501
<p>The following two examples show typical mappings.</p>

0 commit comments

Comments
 (0)