Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS3 font-size-adjust property

CSS3 font-size-adjust Property

Example

By specifying the font-size-adjust property, the browser will adjust the font size regardless of the font family (the "SimSun" aspect value is 0.58):

div

{

font-size-adjust: 0.58;

}

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Currently only Firefox supports the font-size-adjust property.


Property definition and usage

The font-size-adjust property gives you better control over the font size when the first choice of font is not available.

When a font is unavailable, the browser uses the second specified font. This may cause a change in font size. To prevent this, use the font-size-adjust property.

All fonts have an "aspect value", which is the size difference between the lowercase letter "x" and the uppercase letter "X".

When the browser knows the "aspect value" of the first-choice font, it can determine what font-size to use to display the text with the second-choice font.

Default value: none
Inherited: yes
Version: CSS3
JavaScript syntax: object.style.fontSizeAdjust="0.58"

Syntax

font-size-adjust:

number

|none|inherit;

Value Description
number Defines the aspect value ratio of the font. The formula that can be used: font size of the preferred font * (font-size-adjust value / aspect value of the available font) = font size that can be applied to the available font. Example: If Verdana at 14px (aspect value 0.58) is unavailable, but an available font has an aspect value of 0.46, then the size of the replacement font will be 14 * (0.58/0.46) = 17.65px.
none Default. If this font is not available, the x-height of this font is not preserved.
inherit Inherits the font-size-adjust property from the parent element.