XML technologies / CSS / Advanced websites with CSS / CSS property reference / font-size-adjust

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

Different typefaces can look different in size at the same point size. The property font-size-adjust lets you compensate manually for these differences in apparent size.

A font’s apparent size depends more on the height of its lowercase letters (x-height) than on its M-height, which is the actual measure of font size. At an M-height of 100 points, Myriad Web has an x-height of 48 points: lowercase letters are thus 48% as tall as capitals. This figure is called the font’s aspect ratio and is therefore 0.48 for Myriad Web. Verdana, for example, has an aspect ratio of 0.58. If a style rule specifies Verdana as an alternative to Myriad Web, the entire text will appear larger than originally intended.

The property font-size-adjust lets you specify the font-size aspect ratio for an element. Alternative typefaces in the rule then share the same x-height and appear equally large.

Inherited: yes

See also: font

Values

The property font-size-adjust is always used together with font-size to adjust a text element’s x-height. The value none disables size adjustment for the element.

Default value: none

Compatibility

CSS version: 2

Not supported by any current browser.

Example

The following style rule specifies a series of typefaces for body and uses font-size-adjust to set the aspect ratio in which each typeface is displayed:

body {
 font-family: "Myriad Web", Verdana, Helvetica, sans-serif;
 font-size-adjust: 0.48; /* Seitenverhaeltnis von Myriad Web */
}

  

 

 

 

back to top