Skip to content

Commit abb7c1e

Browse files
committed
[css-fonts-4] improve font-size-adjust example #2859
1 parent f3014c9 commit abb7c1e

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

css-fonts-4/Overview.bs

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ Relative sizing: the 'font-size-adjust' property</h3>
999999

10001000
For any given font size, the apparent size and effective legibility of text
10011001
varies across fonts.
1002-
For scripts such as Latin or Cyrillic that
1002+
For bicameral scripts such as Latin or Cyrillic that
10031003
distinguish between upper and lowercase letters,
10041004
the relative height of lowercase letters
10051005
compared to their uppercase counterparts
@@ -1009,7 +1009,8 @@ Relative sizing: the 'font-size-adjust' property</h3>
10091009
divided by the font size.
10101010

10111011
In situations where font fallback occurs,
1012-
fallback fonts might not share the same aspect value as the desired font family
1012+
fallback fonts might not share the same aspect value
1013+
as the desired font family
10131014
and will thus be less readable.
10141015
The 'font-size-adjust' property is a way
10151016
to preserve the readability of text when font fallback occurs.
@@ -1020,31 +1021,40 @@ Relative sizing: the 'font-size-adjust' property</h3>
10201021
<div class="example">
10211022
The style defined below defines Verdana as the desired font family,
10221023
but if Verdana is not available Futura or Times will be used.
1024+
One paragraph also has font-size-adjust specified.
10231025

10241026
<pre>
10251027
p {
10261028
font-family: Verdana, Futura, Times;
10271029
}
1030+
p.adj {
1031+
font-size-adjust: 0.545;
1032+
}
10281033

10291034
&lt;p>Lorem ipsum dolor sit amet, ...&lt;/p>
1035+
&lt;p class="adj">Lorem ipsum dolor sit amet, ...&lt;/p>
10301036
</pre>
10311037

1032-
Verdana has a relatively high aspect value,
1033-
lowercase letters are relatively tall compared to uppercase letters,
1038+
Verdana has a relatively high aspect value of 0.545,
1039+
meaning lowercase letters are relatively tall
1040+
compared to uppercase letters,
10341041
so at small sizes text appears legible.
1035-
Times has a lower aspect value and so if fallback occurs,
1036-
the text will be less legible at small sizes than Verdana.
1042+
Times has a lower aspect value of 0.447,
1043+
and so if fallback occurs,
1044+
the text will be less legible at small sizes than Verdana
1045+
unless font-size-adjust is also specified.
10371046
</div>
10381047

10391048
How text rendered in each of these fonts compares is shown below,
10401049
the columns show text rendered in Verdana, Futura and Times.
10411050
The same font-size value is used across cells
10421051
within each row and red lines are included to show the differences in x-height.
1043-
In the upper half each row is rendered in the same font-size value.
1044-
The same is true for the lower half
1052+
In the upper half, each row is rendered in the same font-size value.
1053+
The same is true for the lower half,
10451054
but in this half the 'font-size-adjust' property is also set
1055+
to 0.545,
10461056
so that the actual font size is adjusted
1047-
to preserve the x-height across each row.
1057+
to preserve the x-height of Verdana across each row.
10481058
Note how small text remains relatively legible across each row in the lower half.
10491059

10501060
<figure>

0 commit comments

Comments
 (0)