Skip to content

Commit b30f115

Browse files
committed
[css-fonts-4] critical oblique angle is now 11 deg, fix w3c#2539
1 parent c0e19ce commit b30f115

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

css-fonts-4/Overview.bs

+13-7
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ Font style: the 'font-style!!property' property</h3>
839839
multiple oblique faces at various angles,
840840
or various combinations thereof.
841841
The font matching routine will select a font to use which is closest to the requested angle.
842-
In general, for a requested angle greater or equal to 20deg,
842+
In general, for a requested angle greater or equal to 11deg,
843843
larger angles are preferred;
844844
otherwise, smaller angles are preferred.
845845
(See [[#font-matching-algorithm]].)
@@ -3471,8 +3471,8 @@ if all font style properties were set to their initial value.
34713471
2. Otherwise, italic values above the desired italic value are checked in ascending order followed by
34723472
italic values below the desired italic value, until 0 is hit. Only positive values of italic values are checked
34733473
in this stage.
3474-
3. If no match is found, oblique values greater than or equal to 20deg are checked in ascending order
3475-
followed by oblique values below 20deg in descending order, until 0 is hit. Only positive values of oblique values
3474+
3. If no match is found, oblique values greater than or equal to 11deg are checked in ascending order
3475+
followed by oblique values below 11deg in descending order, until 0 is hit. Only positive values of oblique values
34763476
are checked in this stage.
34773477

34783478
ISSUE: The threshold for preferring oblique over normal <a href="https://github.com/w3c/csswg-drafts/issues/2295">should be lower than the average angle</a>.
@@ -3488,7 +3488,7 @@ if all font style properties were set to their initial value.
34883488
As you can see, because font D contains the minimum italic value across the entire family, font D would be selected by this algorithm. However, if font D were somehow eliminated from the family, font E would then contain the lowest distance in the family, so it would be selected. If E were eliminated, C would be selected. If C were eliminated, font B would not be chosen immediately; instead, oblique values would be consulted and an oblique value might be chosen. However, if no oblique value is chosen, font B would then be selected, followed by font A.
34893489
</div>
34903490

3491-
If the value of 'font-style!!property' is ''oblique'' and the requested angle is greater than or equal to 20deg,
3491+
If the value of 'font-style!!property' is ''oblique'' and the requested angle is greater than or equal to 11deg,
34923492

34933493
<ol id="greater-oblique-steps">
34943494
1. If the matching set includes faces with oblique values containing the value of ''oblique'',
@@ -3517,7 +3517,7 @@ if all font style properties were set to their initial value.
35173517
</div>
35183518
</ol>
35193519

3520-
If the value of 'font-style!!property' is ''oblique'' and the requested angle is greater than or equal to 0deg and less than 20deg,
3520+
If the value of 'font-style!!property' is ''oblique'' and the requested angle is greater than or equal to 0deg and less than 11deg,
35213521

35223522
<ol id="lesser-oblique-steps">
35233523
1. If the matching set includes faces with oblique values containing the value of ''oblique'',
@@ -3548,7 +3548,7 @@ if all font style properties were set to their initial value.
35483548
As you can see, because font D contains the minimum oblique value across the entire family, font D would be selected by this algorithm. However, if font D were somehow eliminated from the family, font C would then contain the lowest distance in the family, so it would be selected. If C were eliminated, E would be selected. If E were eliminated, font B would not be chosen immediately; instead, italic values would be consulted and an italic value might be chosen. However, if no italic value is chosen, font B would then be selected, followed by font A.
35493549
</div>
35503550

3551-
If the value of 'font-style!!property' is ''oblique'' and the requested angle is less than 0deg and greater than -20deg, follow the steps <a href="#lesser-oblique-steps">above</a>, except with the negated values and opposite directions. If the value of 'font-style!!property' is ''oblique'' and the requested angle is less than or equal to -20deg, follow the steps <a href="#greater-oblique-steps">above</a>, except with the negated values and opposite directions.
3551+
If the value of 'font-style!!property' is ''oblique'' and the requested angle is less than 0deg and greater than -11deg, follow the steps <a href="#lesser-oblique-steps">above</a>, except with the negated values and opposite directions. If the value of 'font-style!!property' is ''oblique'' and the requested angle is less than or equal to -11deg, follow the steps <a href="#greater-oblique-steps">above</a>, except with the negated values and opposite directions.
35523552

35533553
If the value of 'font-style!!property' is ''font-style/normal'',
35543554

@@ -3567,7 +3567,7 @@ if all font style properties were set to their initial value.
35673567

35683568
If an oblique angle was found in the above search, all faces which don't include that oblique angle are excluded from the matching set. Otherwise, if an italic value was found in the above search, all faces which don't include that italic value are excluded from the matching set.
35693569

3570-
User agents are not required to distinguish between italic and oblique fonts. In such user agents, the 'font-style!!property' matching steps above are performed by mapping both italic values and oblique angles onto a common scale. The exact nature of this mapping is undefined, however, an italic value of 1 must map to the same value that an oblique angle of 20deg maps to. Within font
3570+
User agents are not required to distinguish between italic and oblique fonts. In such user agents, the 'font-style!!property' matching steps above are performed by mapping both italic values and oblique angles onto a common scale. The exact nature of this mapping is undefined, however, an italic value of 1 must map to the same value that an oblique angle of 11deg maps to. Within font
35713571
families defined via ''@font-face'' rules, italic and oblique
35723572
faces must be distinguished using the value of the
35733573
'font-style!!descriptor' descriptor.
@@ -7200,6 +7200,12 @@ Special thanks to Ilya Grigorik and David Kuettel for their help in developing t
72007200
Changes
72017201
</h2>
72027202

7203+
<h3 id="changes-2021-07-29">Changes from the <a href="https://www.w3.org/TR/2021/WD-css-fonts-4-20210729/">29 July 2021 Working Draft</a> </h3>
7204+
7205+
<ul>
7206+
<li>Reduced the critical angle for oblique font matching from 20deg to 11deg, per WG resolution</li>
7207+
</ul>
7208+
72037209
<h3 id="changes-2020-11-17">Changes from the <a href="https://www.w3.org/TR/2020/WD-css-fonts-4-20201117/">17 November 2020 Working Draft</a> </h3><!-- See https://github.com/w3c/csswg-drafts/commits/main/css-fonts-4/Overview.bs -->
72047210
<!-- new ones at the top -->
72057211

0 commit comments

Comments
 (0)