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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Authors are encouraged to offer a generic font family as a last alternative,<br />

for improved robustness.<br />

For example:<br />

<br />

<br />

<br />

Font test<br />

<br />

BODY { font-family: "new century schoolbook", serif }<br />

<br />

<br />

<br />

Test<br />

What’s up, Doc?<br />

<br />

<br />

Example(s):<br />

The richer selector syntax of <strong>CSS2</strong> may be used to create language-sensitive<br />

typography. For example, some Chinese and Japanese characters are unified to<br />

have the same Unicode codepoint, although the abstract glyphs are not the same<br />

in the two languages.<br />

*:lang(ja-jp) { font: 900 14pt/16pt "Heisei Mincho W9", serif }<br />

*:lang(zh-tw) { font: 800 14pt/16.5pt "Li Sung", serif }<br />

This selects any element that has the given language - Japanese or Traditional<br />

Chinese - and requests the appropriate font.<br />

15.2.3 Font styling: the ’font-style’, ’font-variant’,<br />

’font-weight’ and ’font-stretch’ properties<br />

’font-style’<br />

Value: normal | italic | oblique | inherit<br />

Initial: normal<br />

Applies to: all elements<br />

Inherited: yes<br />

Percentages: N/A<br />

Media: visual<br />

The ’font-style’ property requests normal (sometimes referred to as "roman" or<br />

"upright"), italic, and oblique faces within a font family. Values have the following<br />

meanings:<br />

normal<br />

Specifies a font that is classified as ’normal’ in the UA’s font database.<br />

oblique<br />

Specifies a font that is classified as ’oblique’ in the UA’s font database. Fonts<br />

with Oblique, Slanted, or Incline in their names will typically be labeled<br />

’oblique’ in the font database. A font that is labeled ’oblique’ in the UA’s font<br />

database may actually have been generated by electronically slanting a<br />

200

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

Saved successfully!

Ooh no, something went wrong!