11<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
22 "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
33<html lang="en">
4- <!-- $Id: fonts.src,v 2.68 2002-08-02 19:30:33 bbos Exp $ -->
4+ <!-- $Id: fonts.src,v 2.69 2002-11-17 19:28:45 bbos Exp $ -->
55<HEAD>
66<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
77<TITLE>Fonts</TITLE>
8+ <!-- Changed by: Tantek Celik, 2002-11-16 -->
89<style type="text/css">
910#AutoNumber2 td { text-align:center }
1011</style>
11- <!-- Changed by: Tantek Celik, 2002-06-09 -->
12+ <style type="text/css">
13+ .current,.proposed { background:#feb }
14+ ins.proposed { background:#bfb }
15+ del.proposed { background:#fbb }
16+ body>del,body>ins {display:block}
17+ </style>
1218</HEAD>
1319<BODY>
1420
1521<h1>Fonts</h1>
1622
1723<h2>Introduction</h2>
1824
19- <P >Setting font properties will be among the most common uses of style
25+ <p >Setting font properties will be among the most common uses of style
2026sheets. Unfortunately, there exists no well-defined and universally
2127accepted taxonomy for classifying fonts, and terms that apply to one
2228font family may not be appropriate for others. E.g. 'italic' is
2329commonly used to label slanted text, but slanted text may also be
2430labeled as being <EM>Oblique, Slanted, Incline, Cursive</EM> or
2531<EM>Kursiv</EM>. Therefore it is not a simple problem to map typical
2632font selection properties to a specific font.
33+ </p>
2734
2835<h2><a name="algorithm">Font matching algorithm</a></h2>
2936
30- <P >Because there is no accepted, universal taxonomy of font
37+ <p >Because there is no accepted, universal taxonomy of font
3138properties, matching of properties to font faces must be done
3239carefully. The properties are matched in a well-defined order to
3340insure that the results of this matching process are as consistent as
3441possible across UAs (assuming that the same library of font faces is
3542presented to each of them).
43+ </p>
3644
3745<OL>
3846
3947<LI>The User Agent makes (or accesses) a database of relevant CSS 2.1
40- properties of all the fonts of which the UA is aware. The UA may be
41- aware of a font because it has been installed locally or it has been
42- previously downloaded over the web. If there are two fonts with
48+ properties of all the fonts of which the UA is aware.
49+ If there are two fonts with
4350exactly the same properties, one of them is ignored.
4451
4552<LI>At a given element and for each character in that element, the UA
46- assembles the font- properties applicable to that element. Using the
53+ assembles the font properties applicable to that element. Using the
4754complete set of properties, the UA uses the 'font-family' property to
4855choose a tentative font family. The remaining properties are tested
4956against the family according to the matching criteria described with
@@ -98,8 +105,9 @@ never fail. (See 'font-weight' below.)
98105UA-dependent margin of tolerance. (Typically, sizes for scalable fonts
99106are rounded to the nearest whole pixel, while the tolerance for
100107bitmapped fonts could be as large as 20%.) Further computations, e.g.
101- by 'em' values in other properties, are based on the 'font-size' value
102- that is used, not the one that is specified.
108+ by 'em' values in other properties, are based on
109+ the computed value of 'font-size'.
110+
103111
104112</OL>
105113
@@ -113,21 +121,27 @@ family names. Unlike most other CSS properties, values are separated
113121by a comma to indicate that they are alternatives:
114122
115123<PRE>
116- body { font-family: gill, helvetica , sans-serif }
124+ body { font-family: Gill, Helvetica , sans-serif }
117125</PRE>
118126
119127<P>Although many fonts provide the "missing character" glyph,
120128 typically an open box, as its name implies this should not be
121- considered a match.
129+ considered a match
130+ <del class="current">.</del>
131+ <ins class="proposed">
132+ for characters that cannot be found in the font. (It should,
133+ however, be considered a match for U+FFFD, the "missing character"
134+ character's code point).
135+ </ins>
122136
123137<P>There are two types of font family names:
124138
125139<DL>
126140
127141<dt><a name="value-def-family-name"><family-name></a>
128142
129- <DD>The name of a font family of choice. In the last example, "gill "
130- and "helvetica " are font families.
143+ <DD>The name of a font family of choice. In the last example, "Gill "
144+ and "Helvetica " are font families.
131145
132146<dt><a name="value-def-generic-family"><generic-family></a>
133147
@@ -149,14 +163,14 @@ following generic families are defined:
149163</UL>
150164
151165<P>Style sheet designers are encouraged to offer a generic font family
152- as a last alternative.
166+ as a last alternative. Generic font family names are keywords and must NOT be quoted.
153167
154168</DL>
155169
156170<P>Font names containing whitespace should be quoted:
157171
158172<PRE>
159- body { font-family: "new century schoolbook ", serif }
173+ body { font-family: "New Century Schoolbook ", serif }
160174
161175<BODY STYLE="font-family: 'My own font', fantasy">
162176</PRE>
@@ -213,7 +227,8 @@ characters. As a last resort, uppercase letters will be used as
213227replacement for a small-caps font.
214228
215229<P>The following example results in an 'H3' element in small-caps,
216- with emphasized words in oblique small-caps:
230+ with any emphasized words in oblique, and any emphasized words within
231+ an 'H3' oblique small-caps:
217232
218233<PRE>
219234h3 { font-variant: small-caps }
@@ -259,8 +274,8 @@ strong { font-weight: bolder }
259274values are names that are descriptive of the "weight" of a font. There
260275is no accepted, universal meaning to these weight names. Their primary
261276role is to distinguish faces of differing darkness within a single
262- font family. Usage across font families is quite variant; for example
263- a font that you might think of as being bold might be described as
277+ font family. Usage across font families is quite variant; for example,
278+ a font that one might think of as being bold might be described as
264279being <EM>Regular, Roman, Book, Medium, Semi-</EM> or <EM>DemiBold,
265280Bold,</EM> or <EM>Black,</EM> depending on how black the "normal" face
266281of the font is within the design. Because there is no standard usage
@@ -364,7 +379,7 @@ the next lighter numerical value (and keeps the font unchanged).
364379
365380<P>There is no guarantee that there will be a darker face for each of
366381the 'font-weight' values; for example, some fonts may have only a
367- normal and a bold face, others may have eight different face weights.
382+ normal and a bold face, while others may have eight face weights.
368383There is no guarantee on how a UA will map font faces within a family
369384to weight values. The only guarantee is that a face of a given value
370385will be no less dark than the faces of lighter values.
@@ -446,7 +461,7 @@ to another.
446461
447462<p class="note"><em><strong>Note 1.</strong> To preserve readability, a UA applying
448463these guidelines should nevertheless avoid creating font-size resulting
449- in less than 9 pixels per EM unit on a computer display .</em></p>
464+ in less than 9 pixels per EM unit on a computer display.</em></p>
450465
451466<p class="note"><em><strong>Note 2.</strong> In CSS1, the suggested
452467scaling factor between adjacent indexes was 1.5 which user experience
@@ -476,8 +491,8 @@ into account when calculating the font size of the element.
476491<P>Negative values are not allowed.
477492
478493<P>On all other properties, 'em' and 'ex' length values refer to the
479- font size of the current element. On the 'font-size' property, these
480- length units refer to the font size of the parent element.
494+ computed font size of the current element. On the 'font-size' property, these
495+ length units refer to the computed font size of the parent element.
481496
482497<P>Note that an application may reinterpret an explicit size,
483498depending on the context. E.g., inside a VR scene a font may get a
@@ -522,7 +537,7 @@ For a definition of allowed and initial values, see the previously defined prope
522537<PRE>
523538p { font: 12px/14px sans-serif }
524539p { font: 80% sans-serif }
525- p { font: x-large/110% "new century schoolbook ", serif }
540+ p { font: x-large/110% "New Century Schoolbook ", serif }
526541p { font: bold italic large Palatino, serif }
527542p { font: normal small-caps 120%/120% fantasy }
528543</PRE>
@@ -562,7 +577,8 @@ fonts">system fonts</span>:</p>
562577</dl>
563578
564579<P>System fonts may only be set as a whole; that is, the font
565- family, size, weight, style, etc. are all set at the same time.These values may then be altered individually if desired. If no
580+ family, size, weight, style, etc. are all set at the same time.
581+ These values may then be altered individually if desired. If no
566582font with the indicated characteristics exists on a given platform,
567583the user agent should either intelligently substitute (e.g., a smaller
568584version of the 'caption' font might be used for the 'small-caption'
@@ -600,6 +616,7 @@ to its initial value, this has the same effect as this declaration:
600616
601617<pre>
602618button p {
619+ font-family: Charcoal;
603620 font-style: normal;
604621 font-variant: normal;
605622 font-weight: 600;
0 commit comments