CSS3 Fonts test staging

Once reviewed, these tests go to Web Platform Tests in the css/css-fonts-3 directory.

Low-level equivalence tests

These tests compare the higher-level font-variant-* properties with the equivalent low-level font-feature-settings properties. They use a special font created by Myles, which shows the low-level features which are enabled.

For example, the CSS3 Fonts spec defines font-variant-caps: small-caps to be equivalent to font-feature-settings: "smcp" off, "c2sc" off, "pcap" off, "c2pc" off, "unic" off, "titl" off

Tests are staged here to aid review of the pull requests on the Web Platform Tests CSS repo. Some initial results are available below.

Here is an overview test for the special font: fancytester.html.

Pass-fail font selection tests

These tests check that the correct one of two or more @font-face rules is used. The correct font displays "Pass" while the incorrect font(s) display "FAIL". These fonts were originally developed by Tal Leming for the WOFF 1.0 testsuite.

Preliminary results

In general, it seems that Gecko does a good job of implementing both the low-level and the high-level forms, and so passes the majority of tests. Edge does a good job on the low level tests but does not implement any of the high level ones. Chrome implements some of the longhands well, and for others it only implements the low level versions. Safari on OS X is more complex, it seems to depend on the particular property value whether they implement both; in the other cases they implement the high-level form only.

Key for number of passing implementations: None | One | Two, kinda, nearly with some effort | Two or more complete passes, CR-happy | unknown, lacking tests.

Sections whose title has a black border are marked at-risk in the specification, or we have already decided to move the feature to level 4.

The full test results for reviewed tests are available, using the CSS test harness and reporting mechanism.


3.3 Font width: the font-stretch property

18 tests for the initial value, for all the keywords, and for filling missing values.

Gecko, Edge and Chrome pass all.

3.8. Controlling synthetic faces: the font-synthesis property

Five tests, for all values.

Gecko and Safari pass all tests. Chrome and Edge fail all of them.

6.2 Language-specific display

One test, and it is hard to make it a reftest. This section uses language like it's important and are required to infer rather than must.

Gecko, Chrome and Edge all pass this test. Safari fails it.

6.3 Kerning: the font-kerning property

5 tests, for all values, including horizontal and vertical text. The test for font-kerning: auto merely tests for the syntax, using @supports, because the spec allows a lot of wiggle room on auto.

Gecko and Chrome pass 4/5; both fail to enable vkrn rather than kern on vertical text (Gecko bug, fixed in FF57). Safari and Edge pass 2/5 (but pass and fail different tests). There are a couple of untested normative statements in that section.

6.4 font-variant-ligatures

11 tests, for all values.

Gecko passes all of them. Edge implements low-level but not high-level (partial passes on 9/11, and fails on -11 which should have a bug submitted on an unrelated text-rendering issue with zwnj). Chrome passes all of them. Safari/OS X passes nearly all (10/11 and has an unrelated text-rendering issue with zwnj).

6.5 font-variant-position

3 tests, for all values. Test pass criteria have been loosened, because the spec has a lot of hand waving to cope with implementation variability for backwards compatibility. So two of them are no longer reftests.

Needs tests for non-nesting.

Gecko passes 2/3. Edge implements low-level but not high-level (partial passes on 2/3. Chrome implements low-level but not high-level (partial passes on 2/3). Safari/OS X passes 2/3.

6.6 font-variant-caps

7 tests for all values. Lots of other normative statements in that section.

Gecko passes all of them. Edge implements low-level but not high-level (partial passes on 6/7). Chrome passes all of them. Safari/OS X is complicated: it passes 4/7, seems to only implement the high level on some.

6.7 font-variant-numeric

9 tests, for all values.

Gecko passes all of them. Edge implements low-level but not high-level (partial passes on 8/9). Chrome passes all of them. Safari/OS X is complicated: it passes 6/9, seems to only implement the high level on the test.

6.8 font-variant-alternates

18 tests, for all values.

Gecko passes. Edge implements low-level but not high-level (partial pass). Chrome implements low-level but not high-level (partial pass; Chrome bug ). Safari/OS X mostly implements high-level but not low-level (passes 2/18).

6.9 Defining font specific alternates: the @font-feature-values rule

17 of the font-variant-alternates tests also test @font-feature-values rules.

Lots of other normative statements in that section

6.10 font-variant-east-asian

10 tests, for all values.

Gecko and recently, Chrome, pass all of them. Edge implements low-level but not high-level (partial passes on 9/10). Safari/OS X is complicated: it passes 4/10, seems to only implement the high level on the rest.

6.11 font-variant

4 tests, just for those values which are not duplicates of the font-variant-* longhands. All of the other longhand tests can also be duplicated as shorthand tests, which I plan to do once they are reviewed. Tests recently fixed, they had two bugs which made implementations fail (partial passes).

Gecko and Chrome pass. Edge passes 2/4.

6.12 font-feature-settings

Most of the tests listed here also test this section, and are marked up as such.

6.13 font-language-override

One test, basic syntax using @supports. hard to test reliably. (add a test from the example in the spec?)

Gecko passes; Chrome, Edge, Safari fails.

7.1 Default features

Gecko, Chrome and Safari all pass; Edge fails.

7.2 feature precedence

(no tests at all, but testable)

8 Object Model

What the spec says is not implemented. Implementations follow the old DOM 2 spec instead. See [css-fonts] CSSFontFaceRule does not seem Web compatible #825 and related pull request [css-fonts] Move CSSFontFaceRule attributes to Level 4 #1247

8.1 The CSSFontFaceRule interface

Gecko, Edge, Chrome, Safari pass

8.2 The CSSFontFeatureValuesRule interface

Gecko passes; Edge, Chrome, Safari fail.


$Date: 2018/04/11 09:58:47 $