Difference between revisions of "CSS GUIDE FONT-SIZE-ADJUST"
MCanaday49 (talk | contribs) m |
m (Reverted edits by MCanaday49 (Talk) to last revision by Mdsouza) |
||
Line 1: | Line 1: | ||
== Summary == | == Summary == | ||
− | A factor contributing to the legibility of fonts at different sizes is the relationship between | + | A factor contributing to the legibility of fonts at different sizes is the relationship between the height of the 'font-size' and the height of the font's x-height (the height of its lowercase letter 'x'.) The ratio between these two factors ('font-size' divided by x-height) is called a font's "aspect value." If an aspect value ratio is large for a font, it is more likely to be legible at a given font-size than a font with a smaller aspect value. |
− | The '''font-size-adjust''' property allows authors to specify the | + | The '''font-size-adjust''' property allows authors to specify the "aspect value" that they wish to maintain. It becomes helpful when a specified font is unavailable and the system needs hints to determine the most suitable substitute. |
== Syntax == | == Syntax == | ||
− | + | <pre> | |
h5.med { font-size-adjust: number | none } | h5.med { font-size-adjust: number | none } | ||
− | + | </pre> | |
== Legal Values == | == Legal Values == | ||
Line 27: | Line 27: | ||
== Usage Examples == | == Usage Examples == | ||
− | + | <pre> | |
Ext/Doc: h5.med { font-size-adjust: 0.58 } | Ext/Doc: h5.med { font-size-adjust: 0.58 } | ||
− | In-Line: | + | In-Line: <h5 STYLE="font-size-adjust: 0.58">text</h5> |
− | + | </pre> | |
== Notes == | == Notes == |
Latest revision as of 13:10, 17 April 2013
Contents
Summary
A factor contributing to the legibility of fonts at different sizes is the relationship between the height of the 'font-size' and the height of the font's x-height (the height of its lowercase letter 'x'.) The ratio between these two factors ('font-size' divided by x-height) is called a font's "aspect value." If an aspect value ratio is large for a font, it is more likely to be legible at a given font-size than a font with a smaller aspect value.
The font-size-adjust property allows authors to specify the "aspect value" that they wish to maintain. It becomes helpful when a specified font is unavailable and the system needs hints to determine the most suitable substitute.
Syntax
h5.med { font-size-adjust: number | none }
Legal Values
inherit
- Explicitly sets the value of this property to that of the parent.
none
- Do not preserve the current specified font's x-height if the font is not available.
number
- Specifies the Aspect Value ratio for the font. The formula for determining the appropriate font size for an available font is:
['font-size']*(['font-size-adjust']/[aspect value of available font]) = [font size to use]
Mozilla Recommended Values
Usage Examples
Ext/Doc: h5.med { font-size-adjust: 0.58 } In-Line: <h5 STYLE="font-size-adjust: 0.58">text</h5>
Notes
- Child elements inherit 'un-adjusted' font-size values.
- The CSS2 spec states that a 'font-size-adjust' number value indicates the aspect value of the first-choice font. No mention is made of what should happen if the actual aspect value of the indicated font conflicts with the given aspect value.