font-size-adjust

  • Revision slug: CSS/font-size-adjust
  • Revision title: font-size-adjust
  • Revision id: 19498
  • Created:
  • Creator: DBaron
  • Is current revision? No
  • Comment /* Browser compatibility */

Revision Content

{{template.CSSRef()}}

Summary

The {{template.Cssxref("font-size-adjust")}} property specifies that font size should be chosen based on the height of lowercase letters rather than the height of capital letters.

This is useful since the legibility of fonts, especially at small sizes, is determined more by the size of lowercase letters than by the size of capital letters. This can cause problems when the first-choice {{template.Cssxref("font-family")}} is unavailable and its replacement has a significantly different aspect ratio (the ratio of the size of lowercase letters to the size of the font).

To do this in a way that is compatible with browsers that do not support {{template.Cssxref("font-size-adjust")}}, it is specified as a number that the {{template.Cssxref("font-size")}} property is multiplied by. This means the value specified for the property should generally be the aspect ratio of the first choice font. For example, a style sheet that specifies font-size: 16px; font-size-adjust: 0.5 is really specifying that the lowercase letters of the font should be 8px high (16px times 0.5).

Syntax

font-size-adjust: <number> | none | {{template.Cssxref("inherit")}}

Values

none 
Choose the size of the font based only on the {{template.Cssxref("font-size")}} property.
<number> 

Choose the size of the font so that its lowercase letters (as determined by the x-height metric of the font) are the specified number times the {{template.Cssxref("font-size")}}.

The number specified should generally be the aspect ratio (ratio of x-height to font size) of the first choice {{template.Cssxref("font-family")}}. This will mean that the first choice font, when available, will appear the same size in browsers, whether or not they support {{template.Cssxref("font-size-adjust")}}.

Examples

{{template.CSSRefExampleLink("font-size-adjust")}}

p{
  font: 12px Verdana, sans-serif;
  font-size-adjust: 0.58;
}

Notes

Specifications

Browser compatibility

Supported on all platforms starting in Gecko 1.9 / Firefox 3, but supported on Windows only significantly earlier.

See also

{{template.Cssxref("font-size")}}, {{template.Cssxref("font-family")}}

Revision Source

<p> 
{{template.CSSRef()}}
</p>
<h3 name="Summary"> Summary </h3>
<p>The {{template.Cssxref("font-size-adjust")}} property specifies that font size should be chosen based on the height of lowercase letters rather than the height of capital letters.
</p><p>This is useful since the legibility of fonts, especially at small sizes, is determined more by the size of lowercase letters than by the size of capital letters.  This can cause problems when the first-choice {{template.Cssxref("font-family")}} is unavailable and its replacement has a significantly different aspect ratio (the ratio of the size of lowercase letters to the size of the font).
</p><p>To do this in a way that is compatible with browsers that do not support {{template.Cssxref("font-size-adjust")}}, it is specified as a number that the {{template.Cssxref("font-size")}} property is multiplied by.  This means the value specified for the property should generally be the aspect ratio of the first choice font.  For example, a style sheet that specifies <code><a href="en/CSS/font-size">font-size</a>: 16px; <a href="en/CSS/font-size-adjust">font-size-adjust</a>: 0.5</code> is really specifying that the lowercase letters of the font should be <code>8px</code> high (16px times 0.5).
</p>
<ul><li> <a href="en/CSS/initial_value">Initial value</a>: <code>none</code>
</li><li> Applies to: all elements
</li><li> <a href="en/CSS/inheritance">Inherited</a>: yes
</li><li> Media: <a href="en/CSS/Media/Visual">Visual</a>
</li><li> <a href="en/CSS/computed_value">Computed value</a>: as specified
</li></ul>
<h3 name="Syntax"> Syntax </h3>
<p><code>font-size-adjust:</code> &lt;number&gt; | <code>none</code> | {{template.Cssxref("inherit")}}
</p>
<h3 name="Values"> Values </h3>
<dl><dt> <code>none</code> </dt><dd> Choose the size of the font based only on the {{template.Cssxref("font-size")}} property.
</dd><dt> &lt;number&gt; </dt><dd> <p>Choose the size of the font so that its lowercase letters (as determined by the x-height metric of the font) are  the specified number times the {{template.Cssxref("font-size")}}.</p>  <p>The number specified should generally be the aspect ratio (ratio of x-height to font size) of the first choice {{template.Cssxref("font-family")}}.   This will mean that the first choice font, when available, will appear the same size in browsers, whether or not they support {{template.Cssxref("font-size-adjust")}}.</p>
</dd></dl>
<h3 name="Examples"> Examples </h3>
<p>{{template.CSSRefExampleLink("font-size-adjust")}}
</p>
<pre>p{
  font: 12px Verdana, sans-serif;
  font-size-adjust: 0.58;
}

</pre>
<h3 name="Notes"> Notes </h3>
<h3 name="Specifications"> Specifications </h3>
<ul><li> <a class="external" href="http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#propdef-font-size-adjust">CSS 2</a>
</li><li> <a class="external" href="http://www.w3.org/TR/css3-fonts/#font-size-adjust">css3-fonts</a>
</li></ul>
<h3 name="Browser_compatibility"> Browser compatibility </h3>
<p>Supported on all platforms starting in Gecko 1.9 / Firefox 3, but supported on Windows only significantly earlier.
</p>
<h3 name="See_also"> See also </h3>
<p>{{template.Cssxref("font-size")}}, {{template.Cssxref("font-family")}}
</p>
Revert to this revision