Bug 1854743 [wpt PR 42115] - [text-spacing-trim] Support fonts with `chws`, a=testonly
commit864077f44e21e9f261ba95ca9e70a066f344278d
authorKoji Ishii <kojii@chromium.org>
Wed, 27 Sep 2023 12:16:00 +0000 (27 12:16 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Thu, 28 Sep 2023 14:58:45 +0000 (28 14:58 +0000)
tree685f7b5033f28098bb549002cb65a5a2c2119a70
parent71b98bddd7579f5cf7078e8770593beee76fbec6
Bug 1854743 [wpt PR 42115] - [text-spacing-trim] Support fonts with `chws`, a=testonly

Automatic update from web-platform-tests
[text-spacing-trim] Support fonts with `chws`

This patch changes the `EastAsianSpacing` logic to support
fonts with `chws`, along with a test with a test font that
has `chws`.

When the font has `chws`, it can handle character sequences
automatically, similar to kerning. All what the rendering
engine must do is at the run edges, where OpenType features
can't handle.

Not only necessary, applying `halt` on top of `chws` kerns
twice, causing glyph collisions. This patch fixes it.

The test is the same as `text-spacing-trim-001.html` except
it uses the font with `chws`. This can probably be done by the
wpt variants[1], but it doesn't work as expected with Chromium
bots. This is being investigated separately[2].

[1] https://wpt-docs.readthedocs.io/en/latest/_writing-tests/testharness.html#variants
[2] crbug.com/1485860

Bug: 1463891
Change-Id: Ia8d8fd260135b43cdcd3b266ca1de038d22809b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4881743
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1200102}

--

wpt-commits: 9fed32c6cef0022c32812e67c59ee399237f3ecb
wpt-pr: 42115
testing/web-platform/tests/css/css-text/text-spacing-trim/support/fonts/NotoSansCJKjp-Regular-subset-chws.otf [new file with mode: 0644]
testing/web-platform/tests/css/css-text/text-spacing-trim/support/fonts/README.md
testing/web-platform/tests/css/css-text/text-spacing-trim/text-spacing-trim-chws-001.html [new file with mode: 0644]