7979
8080 < h1 id =css-fonts > CSS Fonts Level 3</ h1 >
8181
82- < h2 class ="no-num no-toc " id =longstatus > Editor's Draft 11 June 2008</ h2 >
82+ < h2 class ="no-num no-toc " id =longstatus > Editor's Draft 12 June 2008</ h2 >
8383
8484 < dl id =authors >
8585 < dt > This version:
@@ -1343,7 +1343,7 @@ <h3 id=relative><span class=secno>3.7 </span>Relative sizing: the ‘<a
13431343 < tr >
13441344 < td > Percentages:
13451345
1346- < td > hmmmm
1346+ < td > N/A
13471347
13481348 < tr >
13491349 < td > Media:
@@ -1353,7 +1353,7 @@ <h3 id=relative><span class=secno>3.7 </span>Relative sizing: the ‘<a
13531353 < tr >
13541354 < td > Computed value:
13551355
1356- < td > hmmmm
1356+ < td > as specified
13571357 </ table >
13581358
13591359 < p > For any given font size, the apparent size and legibility often varies
@@ -1400,34 +1400,12 @@ <h3 id=relative><span class=secno>3.7 </span>Relative sizing: the ‘<a
14001400 lower half.
14011401
14021402 < div class =figure > < img src =fontsizeadjust.png >
1403- < p class =caption > Small text with and without the use of font-size-adjust</ p >
1403+ < p class =caption > Text with and without the use of font-size-adjust</ p >
14041404 </ div >
1405- <!--
1406- <p>In <a name="x23"><span class="index-inst" title="bicameral">bicameral</span></a>
1407- scripts, the subjective apparent size and legibility of a font are
1408- less dependent on their <a href="#font-size" class="noxref"><span
1409- class="property">'font-size'</span></a> value than on the value
1410- of their <span class="property">'x-height'</span>, or, more
1411- usefully, on the ratio of these two values, called the <a name="x24"><span
1412- class="index-def" title="aspect value"><dfn>aspect value</dfn></span></a>
1413- (x-height divided by font-size). The higher the aspect value, the more
1414- likely it is that a font at smaller sizes will be legible. Inversely,
1415- faces with a lower aspect value will become illegible more rapidly
1416- below a given threshold size than faces with a higher aspect
1417- value. Straightforward font substitution that relies on font size
1418- alone may lead to illegible characters.
1419-
1420- <p>For example, the popular font Verdana has an aspect value of 0.58;
1421- when Verdana's font size 100 units, its x-height is 58 units. For
1422- comparison, Times New Roman has an aspect value of 0.46. Verdana will
1423- therefore tend to remain legible at smaller sizes than Times New
1424- Roman. Conversely, Verdana will often look 'too big' if substituted
1425- for Times New Roman at a chosen size.
1426- -->
14271405
14281406 < p > This property allows authors to specify an aspect value for an element
1429- that will preserve the x-height of the first choice font, whether it is
1430- substituted or not. Values have the following meanings:
1407+ that will effectively preserve the x-height of the first choice font,
1408+ whether it is substituted or not. Values have the following meanings:
14311409
14321410 < dl >
14331411 < dt > < strong > none</ strong >
@@ -1437,65 +1415,64 @@ <h3 id=relative><span class=secno>3.7 </span>Relative sizing: the ‘<a
14371415 < dt > < span class =index-inst id =ltnumbergt
14381416 title ="<number> "> <number></ span >
14391417
1440- < dd > Specifies the aspect value. The number typically refers to the aspect
1441- value of the first choice font. The scaling factor for all fonts is
1442- computed according to the following formula:
1443- < pre > y(a/a') = c
1418+ < dd > Specifies the aspect value used in the calculation below to calculate
1419+ the adjusted font size:
1420+ < pre > c = ( a / a' ) s
14441421</ pre >
14451422
14461423 < p > where:</ p >
14471424
1448- < pre > y = ' font-size' actual value
1449- a = aspect value as specified by the font-size-adjust property value
1450- a' = aspect value of actual font
1451- c = ' font-size' to apply to font
1425+ < pre > s = font-size value
1426+ a = aspect value as specified by the font-size-adjust property
1427+ a' = aspect value of actual font
1428+ c = adjusted font-size to use
14521429</ pre >
1430+
1431+ < p > This value applies to any font that is selected but in typical usage
1432+ it should be based on the aspect value of the first font in the
1433+ font-family list. If this is specified accurately, the (a/a') term in
1434+ the formula above is effectively 1 for the first font and no adjustment
1435+ occurs. If the value is specified inaccurately, text rendered using the
1436+ first font in the family list will display differently in older user
1437+ agents that don't support font-size-adjust.</ p >
14531438 </ dl >
14541439
1455- < p > The calculation of the aspect ratio is easily calculated with font data
1456- available to user agents but authors can calculate this by experimenting
1457- with large-sized text. Given two spans of text with the same font-size
1458- value and the font-size-adjust property specified on just one, the two
1459- spans will match when the font-size-adjust property is accurate.
1440+ < p > Authors can calculate the aspect value for a given font by comparing
1441+ spans with the same content but different font-size-adjust properties. If
1442+ the same font-size is used, the spans will match when the font-size-adjust
1443+ value is accurate for the given font.
14601444
1461- < p > Example of experimentally determining the aspect ratio.
1445+ < div class =example >
1446+ < p > Two spans with borders are used to determine the aspect value of a
1447+ font. The font-size is the same for both spans but the font-size-adjust
1448+ property is specified only for the right span. Starting with a value of
1449+ 0.5, the aspect value can be adjusted until the borders around the two
1450+ letters line up.</ p >
1451+
1452+ < pre > p {
1453+ font-family: Futura;
1454+ font-size: 500px;
1455+ }
14621456
1463- < p class = issue > How does inheritance work for this? This doesn't affect
1464- computed font-size value. </ p >
1465- <!--
1457+ span {
1458+ border: solid 1px red;
1459+ }
14661460
1467- <div class="example"><P style="display:none">Example(s):</P>
1468- <p>For example, if 14px Verdana (with an aspect value of 0.58) was
1469- unavailable and an available font had an aspect value of 0.46, the
1470- font-size of the substitute would be 14 * (0.58/0.46) = 17.65px. If Verdana is
1471- available, no adjustment occurs, as long as its actual aspect value is the same
1472- as the hypothetical aspect value provided by the font-size-adjust property.</div>
1473-
1474-
1475- <p>Font size adjustments take place when computing the actual value of <a href="#font-size" class="noxref"><span
1476- class="property">'font-size'</span></a>. Since inheritance is
1477- based on the computed value,
1478- child elements will inherit unadjusted values. Font size adjustments are applied
1479- to all fonts used by child elements, substituted or not.<p>The first image below shows several typefaces rasterized at a
1480- common font size (11pt. at 72 ppi), together with their aspect
1481- values. Note that faces with higher aspect values appear larger than
1482- those with lower. Faces with very low aspect values are illegible at
1483- the size shown.</p>
1484-
1485- <div class="figure"><img src="font-adjust-a.gif" alt="Comparison of 12 point fonts" width="450" height="720">
1486- <p class="caption">11pt text with various fonts</p></div>
1487-
1488- <p>The next image shows the results of <a href="#font-size-adjust" class="noxref"><span
1489- class="property">'font-size-adjust'</span></a> where Verdana has
1490- been taken as the"first choice", together with the scaling factor applied.
1491- As adjusted, the apparent sizes are nearly linear across faces, though the
1492- actual (em) sizes vary by more than 100%. Note that <a href="#font-size-adjust" class="noxref"><span
1493- class="property">'font-size-adjust'</span></a>
1494- tends to stabilize the horizontal metrics of lines, as well.
1495-
1496- <div class="figure"><img src="font-adjust-b.gif" alt="Comparison of font-adjusted fonts" width="450" height="720">
1497- <p class="caption">11pt text with various fonts, adjusted font size</p></div>
1498- -->
1461+ .adjust {
1462+ font-size-adjust: 0.5;
1463+ }
1464+
1465+ <p> <span> b</span> <span class="adjust"> b</span> </p>
1466+ </ pre >
1467+
1468+ < div class =figure > < img src =beforefontsizeadjust.png >
1469+ < p class =caption > Futura with an aspect value of 0.5</ p >
1470+ </ div >
1471+
1472+ < p > The box on the right is a bit bigger than the one on the left, so the
1473+ aspect value of this font is something less than 0.5. Adjust the value
1474+ until the boxes align.</ p >
1475+ </ div >
14991476 <!-- prop: font -->
15001477
15011478 < h3 id =shorthand > < span class =secno > 3.8 </ span > Shorthand font property: the
@@ -2861,7 +2838,7 @@ <h2 class=no-num id=property-index>Property index</h2>
28612838
28622839 < td > yes
28632840
2864- < td > hmmmm
2841+ < td > N/A
28652842
28662843 < td > visual
28672844
0 commit comments