HTML and CSS Reference
In-Depth Information
24 points of space between the lines of text. Finally, text within a <code>
tag is set in 12-point Courier or the browser-defined monospaced font.
We leave it to your imagination to conjure up examples of the abuses
you could foster with font styles. Perhaps a recent issue of Wired
magazine, notorious for avant-garde fonts and other print-related ab-
uses, would be helpful in that regard.
8.4.4. Font Selection and Synthesis
The original CSS standard, CSS1, had a simplistic font-matching al-
gorithm: if your specified font does not exist in the local client's font
collection, substitute a generic font. Of course, the results are often
less than pleasing to the eye and can wreak havoc with the display.
Moreover, there are often more suitable font substitutes than generic
ones. The CSS2 standard significantly extends the CSS1 font-matching
model and includes a new at-rule that lets authors define, download,
and use new fonts in their documents.
8.4.4.1. CSS2 font-matching steps
The CSS2 font-matching algorithm has four steps. The first step is
simply to use the specified font when it is found on the user's machine;
this could be one of several font families specified in the stylesheet rule,
parsed in their order of appearance.
The second step, taken when none of the fonts specified in the rule
exists on the user's machine, has the browser attempt to find a close
match among similar local fonts. For example, a request for Helvetica
might wind up using Arial, a similar sans-serif font.
The third step in the CSS2 font-matching algorithm has the browser try
to synthesize a font, taking a local font and changing it to match the
specified one. For example, a request for 72-point Helvetica might be
satisfied by taking the local 12-point Arial font and scaling it up to match
the desired size.
 
Search WWH ::




Custom Search