22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The next example defines a family of fonts. A single URI is provided for retrieving<br />

the font data. This data file will contain multiple styles and weights of the<br />

named font. Once one of these @font-face definitions has been dereferenced,<br />

the data will be in the UA cache for other faces that use the same URI.<br />

@font-face {<br />

src: local("Helvetica Medium"),<br />

url(http://www.fonts.org/sans/Helvetica_family) format("truedoc");<br />

font-family: "Helvetica";<br />

font-style: normal<br />

}<br />

@font-face {<br />

src: local("Helvetica Oblique"),<br />

url("http://www.fonts.org/sans/Helvetica_family") format("truedoc");<br />

font-family: "Helvetica";<br />

font-style: oblique;<br />

slope: -18<br />

}<br />

Example(s):<br />

The following example groups three physical fonts into one virtual font with<br />

extended coverage. In each case, the adorned font name is given in the src<br />

descriptor to allow locally installed versions to be preferentially used if available.<br />

A fourth rule points to a font with the same coverage, but contained in a single<br />

resource.<br />

@font-face {<br />

font-family: Excelsior;<br />

src: local("Excelsior Roman"), url("http://site/er") format("intellifont");<br />

unicode-range: U+??; /* Latin-1 */<br />

}<br />

@font-face {<br />

font-family: Excelsior;<br />

src: local("Excelsior EastA Roman"), url("http://site/ear") format("intellifont");<br />

unicode-range: U+100-220; /* Latin Extended A and B */<br />

}<br />

@font-face {<br />

font-family: Excelsior;<br />

src: local("Excelsior Cyrillic Upright"), url("http://site/ecr") format("intellifont");<br />

unicode-range: U+4??; /* Cyrillic */<br />

}<br />

@font-face {<br />

font-family: Excelsior;<br />

src: url("http://site/excels") format("truedoc");<br />

unicode-range: U+??,U+100-220,U+4??;<br />

}<br />

Example(s):<br />

This next example might be found in a UA’s default style sheet. It implements<br />

the <strong>CSS2</strong> generic font family, serif by mapping it to a wide variety of serif fonts<br />

that might exist on various platforms. No metrics are given since these vary<br />

among the possible alternatives.<br />

235

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!