Thursday, January 22, 2009

The font-size-adjust property

The font-size-adjust property is used to specify font size by indirectly specifying the x-height of text. This property accepts three values: a number, none and inherit . This property was dropped from the CSS2.1 specification.
Example: <p style="font-size: 40px;font-size-adjust: 0.55">the quick brown fox jumps over the lazy dog</p>
The x-height of the text will be font size * font-size-adjust . Therefore, in the above example, the x-height will be 40px * 0.55 = 22px . However, depending on the font family, there might be a difference of one pixel.
This property can be used to ensure that when fallback font families are used, their appearance can be similar to the first choice font family.
Browser Support
Internet Explorer 6, Internet Explorer 7, Opera 9.6 and Safari 3.2 ignore this property. Firefox 3 fully supports this property.

No comments: