Chapter 15 - Fonts - 15.2 Font matching algorithm
Go to the relevant page of the specification.
- font-matching-rule-001 (ahem)
-
Font Matching Algorithm, Match Font-Family
If font property match then use the font specified by font-family, if font property doesn't match, don't even try to match font-family. - font-matching-rule-006 (ahem)
-
Font Matching Algorithm, match font-style
If the font contains definition of 'italic' or 'oblique' and italic or oblique is set by the style, then use that font. - font-matching-rule-008 (ahem)
-
Font Matching Algorithm, small-caps synthesized
The small-caps font is rendered similar to uppercase letters except with a smaller size. - font-matching-rule-009 (invalid)
-
Font Matching Algorithm, font-weight out of range
Invalid font weight values are set to the default weight of 400. - font-matching-rule-010 (font)
-
Font Matching Algorithm, font-variant never fails if property does not match
If a font property value is not defined, user agent still can use normal value of that property. - font-matching-rule-012 (ahem)
-
Font Matching Algorithm, font-size and rounding
The font-size for scalable fonts are rounded to the nearest whole pixel. - font-matching-rule-013 (font)
-
Font Matching Algorithm, font-variant font missing small-caps property
A font that is only available as small-caps can be assigned either a normal or a small-caps to its font-variant property. Both values have the same effect. - font-matching-rule-014 (font)
-
Font Matching Algorithm, same fonts
If all available fonts are exactly same in all properties, the user agent selects one of them. - font-style-rule-001 (font)
-
Font-style with font properties missing
When font-style italic is not available, find value oblique, if it's still not available, either use the alternate font-family that has italic or oblique value or use 'font-style: normal'.