8.4. Other Font Properties

8.4.1. The font-style Property

The font-style property determines whether the element is rendered in normal (Roman), italic, or oblique font style. For all practical purposes, italic and oblique are identical.

8.4.2. The font-variant Property

In its current incarnation, the font-variant property has only one effect: it determines whether text should be displayed in small-caps format. In an ideal world, if the current font has a small-caps variant defined, the browser would use that font. Unfortunately, no current browser is smart enough to do that. Rather, current browsers render lowercase letters as capital letters with a smaller size than that used for the main font.

Figure 8-4 demonstrates the font-variant property set to a value of small-caps. The only other value this variant can take is normal.

Figure 8-4. Using the font-variant Property With Setting of small-caps

Note that in IE for Windows prior to Version 6, small-caps type is rendered as all-caps, with no difference in sizes.

8.4.3. The font-weight Property

"Weight" in the context of CSS font control refers to the boldness of the characters. The font-weight property can take two types of values: relative and absolute. Relative values are bolder and lighter. Absolute values range from 100 (lightest) to 900 (boldest) in 100-unit increments, and also include the shortcut names normal (equivalent to 400) and bold (700). This set of values is actually more fine-grained than any current browser supports. The Adobe OpenType font standard does allow for nine levels of boldness in a font family; however, I have yet to see a practical application of all these levels.

As is the case with other relative measurements in CSS properties, the relative settings here are based on the setting of the parent of the element affected.

Because neither browsers nor fonts support the full range of nine different settings for the font-weight property, you will usually find that two or more adjacent values produce identical output on the screen.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.118.95