Prev | Current Page 95 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

2 and later versions.
At-rules Reference
The Ultimate CSS Reference 54
@font-face
@font-face {
font descriptors
}
The @font-face at-rule allows you to
define custom fonts. It was first defined
in the CSS2 specification, but was
removed from CSS2.1. Currently, it??™s a
draft recommendation for CSS3. The
at-rule contains one or more property
declarations, like those in a regular CSS
rule set, which are called font
descriptors. You can specify up to 24
different properties, but it??™s beyond the
scope of this reference to explain them
all??”you can read about them at the
W3C Web Fonts page.3
The font descriptors allow you to define fonts, and to influence the browser??™s
selection of fonts when no matching font is found on the client system. This matching
can be performed not only on the font name, but on many other font characteristics
as well.
Example
This at-rule declares the font family called
Example Font, which is used in the
statement that follows:
@font-face {
font-family: "Example Font";
src: url("http://www.


Pages:
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107