We should have tests in WPT to cover this feature. Approach: Upstream to WPT the current variations tests. Develop new ones for section 5.2 of css-fonts-4, which covers the font-selection algorithm.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c1e2f24fb819692891af08408fbc0541357ace5a commit c1e2f24fb819692891af08408fbc0541357ace5a Author: Dominik Röttsches <drott@chromium.org> Date: Tue Jun 27 21:26:47 2017 Move first set of variable fonts test to WPT The dummy variations code path activations are not needed anymore since we choose by font type now, not by CSS. Also, change the way the reference result is found and how we wait for font load completion. BUG= 737150 Change-Id: I63498e451d76b044eb3e7d8b5ab9f052e6735fc5 Reviewed-on: https://chromium-review.googlesource.com/550076 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#482749} [add] https://crrev.com/c1e2f24fb819692891af08408fbc0541357ace5a/third_party/WebKit/LayoutTests/external/wpt/fonts/variations/resources/variabletest_box.ttf [add] https://crrev.com/c1e2f24fb819692891af08408fbc0541357ace5a/third_party/WebKit/LayoutTests/external/wpt/fonts/variations/variable-box-font-ref.html [rename] https://crrev.com/c1e2f24fb819692891af08408fbc0541357ace5a/third_party/WebKit/LayoutTests/external/wpt/fonts/variations/variable-box-font.html [add] https://crrev.com/c1e2f24fb819692891af08408fbc0541357ace5a/third_party/WebKit/LayoutTests/external/wpt/fonts/variations/variable-gpos-m2b-ref.html [rename] https://crrev.com/c1e2f24fb819692891af08408fbc0541357ace5a/third_party/WebKit/LayoutTests/external/wpt/fonts/variations/variable-gpos-m2b.html [add] https://crrev.com/c1e2f24fb819692891af08408fbc0541357ace5a/third_party/WebKit/LayoutTests/external/wpt/fonts/variations/variable-gsub-ref.html [rename] https://crrev.com/c1e2f24fb819692891af08408fbc0541357ace5a/third_party/WebKit/LayoutTests/external/wpt/fonts/variations/variable-gsub.html [delete] https://crrev.com/46cea8687bbbee19b4c48a341c5814ef01dcbb38/third_party/WebKit/LayoutTests/fast/text/variable-fonts/variable-box-font-expected.html [delete] https://crrev.com/46cea8687bbbee19b4c48a341c5814ef01dcbb38/third_party/WebKit/LayoutTests/fast/text/variable-fonts/variable-gpos-m2b-expected.html [delete] https://crrev.com/46cea8687bbbee19b4c48a341c5814ef01dcbb38/third_party/WebKit/LayoutTests/fast/text/variable-fonts/variable-gsub-expected.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9dd69e9f640b37eb7e4cfe232d152a5222c14d13 commit 9dd69e9f640b37eb7e4cfe232d152a5222c14d13 Author: Dominik Röttsches <drott@chromium.org> Date: Wed Jun 28 15:53:19 2017 Web platform tests for CSS Fonts Level 4 Font Style Matching Add a set of test cases covering stretch, style weight priority rules, as well as distance computations based on a custom made test font called "Variable Test Axis Matching". More details in fonts/matching/README.md. BUG= 737150 Change-Id: Ie4cc6a1c9460b6bf9514a84e695341bd0345ebb8 Reviewed-on: https://chromium-review.googlesource.com/552123 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#483005} [modify] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/NeverFixTests [add] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/external/wpt/fonts/matching/README.md [add] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/external/wpt/fonts/matching/fixed-stretch-style-over-weight-ref.html [add] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/external/wpt/fonts/matching/fixed-stretch-style-over-weight.html [add] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/external/wpt/fonts/matching/font-matching.css [add] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/external/wpt/fonts/matching/resources/variabletest_matching.ttf [add] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/external/wpt/fonts/matching/stretch-distance-over-weight-distance-ref.html [add] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/external/wpt/fonts/matching/stretch-distance-over-weight-distance.html [add] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/external/wpt/fonts/matching/style-ranges-over-weight-direction-ref.html [add] https://crrev.com/9dd69e9f640b37eb7e4cfe232d152a5222c14d13/third_party/WebKit/LayoutTests/external/wpt/fonts/matching/style-ranges-over-weight-direction.html
These tests will be moving to wpt/css-fonts, compare https://github.com/w3c/web-platform-tests/issues/6434
Issue 765614 has been merged into this issue.
Comment 1 by bugdroid1@chromium.org
, Jun 27 2017