HTML and CSS Reference
In-Depth Information
Failing all three previous steps, the browser may take a fourth step and
download the desired font, provided the author has supplied suitable ex-
ternal font definitions. These external font definitions are created with
the @font-face at-rule, whose general syntax is:
@font-face {
descriptor : value;
...
descriptor : value
}
Each @font-face at-rule defines a new font to the browser. Subsequent
requests for fonts may be satisfied by these new fonts. The browser
uses the various descriptor values to ensure that the font supplied
matches the font requested.
8.4.4.2. Basic font descriptors
The basic font descriptors that you use in the @font-face at-rule corres-
pond to the CSS2 font properties and accept the same values as those
properties. Accordingly, use the font-family, font-style, font-variant,
font-weight, font-stretch , and font-size descriptors and their associ-
ated values to define a new font to the browser. For example:
@font-face {
font-family : "Kumquat Sans";
font-style : normal, italic;
src : url("http://www.kumquat.com/foundry/kumquat-sans")
}
defines a font named Kumquat Sans that is available for download from
www.kumquat.com . Within that downloadable font, both the normal and
the italic versions of Kumquat Sans are available. Because we provide
 
Search WWH ::




Custom Search