Skip to content

Commit 8d71811

Browse files
committed
[css-fonts-4] Update syntax for font-stretch in font matching section
Fixes #3266
1 parent c45ca02 commit 8d71811

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

css-fonts-4/Overview.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,7 +2919,7 @@ if all font style properties were set to their initial value.
29192919
are removed from the matching set. If there is no face
29202920
which contains the desired value, a stretch value is chosen using the rules below:
29212921

2922-
* If the desired stretch value is less than or equal to 100, stretch values below the
2922+
* If the desired stretch value is less than or equal to 100%, stretch values below the
29232923
desired stretch value are checked in descending order followed by
29242924
stretch values above the desired stretch value in ascending order until a
29252925
match is found.
@@ -2935,15 +2935,15 @@ if all font style properties were set to their initial value.
29352935
<div class="example" id="ascendingstretch">
29362936
This search algorithm can be thought of as a distance function, where the lowest-distance value present in the font family is selected, and all fonts not including that value are eliminated.
29372937

2938-
Consider a font family with three fonts, named A, B, and C, each with associated supported ranges for the 'font-stretch!!property' descriptor. If an element is styled with "font-stretch: 125", the search algorithm can be visualized as follows:
2938+
Consider a font family with three fonts, named A, B, and C, each with associated supported ranges for the 'font-stretch!!property' descriptor. If an element is styled with "font-stretch: 125%", the search algorithm can be visualized as follows:
29392939

29402940
<img src="images/stretchdistance.svg" alt="algorithm">
29412941

29422942
The font stretch ranges supported by fonts A, B, and C are shown in the graph above. As you can see, because font B contains the minimum stretch value across the entire family, font B would be selected by this algorithm. However, if font B were somehow eliminated from the family, font C would then contain the lowest distance in the family, so it would be selected.
29432943
</div>
29442944

29452945
<div class="example">
2946-
Similar to the <a href="#ascendingstretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-stretch: 75":
2946+
Similar to the <a href="#ascendingstretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-stretch: 75%":
29472947

29482948
<img src="images/stretchdistance2.svg" alt="distance graph">
29492949

css-fonts-4/images/stretchdistance.svg

Lines changed: 4 additions & 4 deletions
Loading

css-fonts-4/images/stretchdistance2.svg

Lines changed: 4 additions & 4 deletions
Loading

0 commit comments

Comments
 (0)