You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These descriptors define the characteristics of a font face and are
609
-
used in the process of matching styles to specific faces. For a font
609
+
used in the process of matching styles to specific faces. For a font
610
610
family defined with several <code>@font-face</code> rules, user agents can either
611
611
download all faces in the family or use these descriptors to selectively
612
-
download font faces that match actual styles used in document. The
613
-
values for these descriptors are the same as those for the corresponding
612
+
download font faces that match actual styles used in document. The
613
+
meaning of the values for these descriptors are the same as those for the corresponding
614
614
font properties except that relative keywords are not allowed, 'bolder' and
615
-
'lighter'. If these descriptors are omitted, initial
615
+
'lighter'. If these descriptors are omitted, initial
616
616
values are assumed. If specified values are out of range of the accepted values
617
617
of the property of the same name, the descriptor is treated as a parse error.
618
618
619
+
Ranges are accepted in these three descriptors in place of a single value. Where a single
620
+
value is specified, it has the same meaning as a range with identical startpoint and
621
+
endpoint. User agents may swap the computed value of the startpoint and endpoint of the range
622
+
in order to forbid decreasing ranges. Both endpoints are inclusive.
623
+
The ranges are used in the <a href="#font-matching-algorithm">Font Matching Algorithm</a> below.
624
+
619
625
The value for these font face style attributes is used in place of
620
626
the style implied by the underlying font data. This allows authors to
621
627
combine faces in flexible combinations, even in situations where the
@@ -798,10 +804,10 @@ at least as dark as its predecessor. Only values between 1 - 999 are valid, and
798
804
<li>'font-stretch' is tried first. If a font
799
805
does not have any concept of varying strengths of stretch values, its stretch value
800
806
is mapped according table in the <a href="#stretchmappings">property definition</a>.
801
-
If the matching set contains faces with width values
802
-
matching the 'font-stretch' value, faces with other width
807
+
If the matching set includes faces with width values
808
+
containing the 'font-stretch' desired value, faces with other width
803
809
values are removed from the matching set. If there is no face
804
-
that exactly matches, a stretch value is chosen using the rules below:
810
+
which contains the desired value, a stretch value is chosen using the rules below:
805
811
<ul>
806
812
<li>If the desired stretch value is less than 100, stretch values below the
807
813
desired stretch value are checked in descending order followed by
@@ -814,14 +820,14 @@ at least as dark as its predecessor. Only values between 1 - 999 are valid, and
814
820
</ul>
815
821
Once the
816
822
closest matching width has been determined by this process,
817
-
faces with other widths are removed from the matching set.
823
+
faces with widths which do not include this determined width are removed from the matching set.
818
824
</li>
819
825
820
826
<li>'font-style' is tried next.
821
827
If the value of 'font-style' is 'italic', italic faces are
822
828
checked first, then oblique, then normal faces. If the value
823
829
is 'oblique', oblique faces are checked first, then italic
824
-
faces and then normal faces. If the value is 'normal',
830
+
faces and then normal faces. If the value is 'normal',
825
831
normal faces are checked first, then oblique faces, then
826
832
italic faces. When checking oblique faces, an oblique angle is chosen using the rules below:
827
833
<ul>
@@ -833,11 +839,13 @@ at least as dark as its predecessor. Only values between 1 - 999 are valid, and
833
839
are checked in descending order until 0deg or a negative value is reached.
834
840
<li>Otherwise, the same steps as above are performed, substituting negative values for the positive ones above.</li>
835
841
</ul>
836
-
During this operation, if a font does not have any concept of varying oblique angles, it is assumed to have an angle of 20deg. Faces with other style values are excluded
837
-
from the matching set. User agents are permitted to
842
+
During this operation, if an oblique font does not have any concept of varying oblique angles, it is assumed to have an angle of 20deg.
843
+
If the search for a normal or italic face successfully determined a font, faces with other style values are excluded
844
+
from the matching set. Otherwise, if the search for an oblique face successfully determined a font, fonts with oblique angles which do not include
845
+
this determined angle are excluded from the matching set. User agents are permitted to
838
846
distinguish between italic and oblique faces within platform
839
847
font families but this is not required, so all
840
-
italic or oblique faces may be treated as italic faces. However, within font
848
+
italic or oblique faces may be treated as italic faces or oblique faces with an angle of 20deg. However, within font
841
849
families defined via <code>@font-face</code> rules, italic and oblique
842
850
faces must be distinguished using the value of the
843
851
'font-style' descriptor.
@@ -853,9 +861,9 @@ at least as dark as its predecessor. Only values between 1 - 999 are valid, and
853
861
If bolder/lighter relative weights are used, the
854
862
effective weight is calculated based on the inherited weight
855
863
value, as described in the definition of the 'font-weight'
856
-
property. Given the desired weight and the weights of faces
864
+
property. Given the desired weight and the weight ranges of faces
857
865
in the matching set after the steps above, if the desired
858
-
weight is available that face matches. Otherwise, a weight
866
+
weight is available inside the weight range of a font in the matching set, then that face matches. Otherwise, a weight
859
867
is chosen using the rules below:
860
868
<ul>
861
869
<li>If the desired weight is 400, 500 is checked first and then
@@ -872,6 +880,8 @@ at least as dark as its predecessor. Only values between 1 - 999 are valid, and
872
880
weights below the desired weight in descending order until a
873
881
match is found.</li>
874
882
</ul>
883
+
Once the closest matching weight has been determined by this process,
884
+
faces with weights which do not include this determined width are removed from the matching set.
0 commit comments