CSS Fonts Module Level 3 CR Test Suite

Font Matching Algorithm (20 tests)

Test Refs Flags Info
+ 5 Font Matching Algorithm
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-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-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'.
fonts-010 = Ahem font inheritance into <pre> elements
fonts-011 = Ahem Fonts and bidi
fonts-012 = Ahem Fonts and not bidi
fonts-013 = Ahem font and fallbacks
fonts-014 = Ahem font and fallbacks
+ 5.1 Case sensitivity of font family names
+ 5.2 Matching font styles
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-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-014 Font Font Matching Algorithm, same fonts
  • If all available fonts are exactly same in all properties, the user agent selects one of them.
ex-unit-004 = support for the ex unit
  • The ex unit equals the x-height of the first available font if it has reliable metrics for the x-height.
first-available-font-001 = CSS-fonts: first available font and the ex unit
  • Fonts that do not include the U+0020 character are not considered the first available font (used to determine the ex unit), even when at the start of the font list.
first-available-font-002 = CSS-fonts: first available font and the ch unit
  • Fonts that do not include the U+0020 character are not considered the first available font (used to determine the ch unit), even when at the start of the font list.
first-available-font-003 = CSS-fonts: first available font and the strut
  • The strut, which impacts the line height, is taken from the primary font, which is the first font to include the U+0020 character.
first-available-font-004 = CSS-fonts: first available font and the strut
  • The strut, which impacts the line height, is taken from the primary font, which is the first font to include the U+0020 character. The fact that that font is used somewhere else in the page makes no difference.
first-available-font-005 = baseline position with explicit sizing, no space in first font
  • The position of the baseline in an inline-level box whose height is determined by a non-normal value of line-height does depend on the primary font, which is the first that contains U+0020.
first-available-font-006 = baseline position with explicit sizing, no space in first font
  • The position of the baseline in an inline-level box whose height is determined by a non-normal value of line-height does depend on the primary font, which is the first that contains U+0020.
first-available-font-007 = CSS-fonts: inline level box content height and first available font, missing U+0020
  • The height of the content area of an inline-level depends only on the first available font, which is the first one to include U+0020.
+ 5.3 Cluster matching
+ 5.4 Character handling issues
+ 5.5 Font matching changes since CSS 2.1
+ 5.6 Font matching examples