Bug 1854995 [wpt PR 42143] - [text-spacing-trim] Use `HarfBuzzShaper` to get glyph IDs, a=testonly

Automatic update from web-platform-tests
[text-spacing-trim] Use `HarfBuzzShaper` to get glyph IDs

This patch changes `EastAsianSpacing` to use `HarfBuzzShaper`
when getting glyph IDs.

Some fonts, such as "Noto CJK", supports multiple locales by a
single font file. When different glyphs are needed by
different locale, they use encoding (`cmap`) and/or OpenType
features such as `calt` to substitute glyphs.

Finding the correct glyph IDs for such fonts requires shaping,
which is not possible with `GlyphForCharacter`.

This patch has no behavior changes as all changes are under a
runtime flag.

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

--

wpt-commits: 20151fb1d83737eb1b41edd4909917a8b693f273
wpt-pr: 42143
This commit is contained in:
Koji Ishii 2023-09-27 12:18:22 +00:00 коммит произвёл moz-wptsync-bot
Родитель b45f47dbca
Коммит c788940fcb
4 изменённых файлов: 204 добавлений и 40 удалений

Просмотреть файл

@ -8,21 +8,62 @@
#container {
font-family: halt-font;
font-size: 20px;
position: relative;
text-spacing-trim: space-all;
}
#container > div {
position: absolute;
top: 0;
}
.col1 {
left: 6em;
}
.col2 {
left: 12em;
}
halt {
font-feature-settings: 'halt' 1;
}
</style>
<div id="container">
<!-- Colon + Open/Close/Middle -->
<div>国:<halt></halt></div>
<div>国:)国</div>
<div>国:・国</div>
<div>国: 国</div>
<!-- Open/Close/Middle + Colon -->
<div>国(:国</div>
<div><halt></halt>:国</div>
<div>国・:国</div>
<div>国 :国</div>
<div lang="ja">
<!-- Colon + Open/Close/Middle -->
<div>国:<halt></halt></div>
<div>国:)国</div>
<div>国:・国</div>
<div>国: 国</div>
<!-- Open/Close/Middle + Colon -->
<div>国(:国</div>
<div><halt></halt>:国</div>
<div>国・:国</div>
<div>国 :国</div>
</div>
<!-- The same content with "zh-hans". -->
<div lang="zh-hans" class="col1">
<!-- Colon + Open/Close/Middle -->
<div>国:<halt></halt></div>
<div><halt></halt>)国</div>
<div><halt></halt>・国</div>
<div><halt></halt> 国</div>
<!-- Open/Close/Middle + Colon -->
<div>国(:国</div>
<div><halt></halt>:国</div>
<div>国・:国</div>
<div>国 :国</div>
</div>
<!-- The same content with "zh-hant". -->
<div lang="zh-hant" class="col2">
<!-- Colon + Open/Close/Middle -->
<div>国:<halt></halt></div>
<div>国:)国</div>
<div>国:・国</div>
<div>国: 国</div>
<!-- Open/Close/Middle + Colon -->
<div>国(:国</div>
<div><halt></halt>:国</div>
<div>国・:国</div>
<div>国 :国</div>
</div>
</div>

Просмотреть файл

@ -10,17 +10,58 @@
#container {
font-family: halt-font;
font-size: 20px;
position: relative;
}
#container > div {
position: absolute;
top: 0;
}
.col1 {
left: 6em;
}
.col2 {
left: 12em;
}
</style>
<div id="container">
<!-- Colon + Open/Close/Middle -->
<div>国:(国</div>
<div>国:)国</div>
<div>国:・国</div>
<div>国: 国</div>
<!-- Open/Close/Middle + Colon -->
<div>国(:国</div>
<div>国):国</div>
<div>国・:国</div>
<div>国 :国</div>
<div lang="ja">
<!-- Colon + Open/Close/Middle -->
<div>国:(国</div>
<div>国:)国</div>
<div>国:・国</div>
<div>国: 国</div>
<!-- Open/Close/Middle + Colon -->
<div>国(:国</div>
<div>国):国</div>
<div>国・:国</div>
<div>国 :国</div>
</div>
<!-- The same content with "zh-hans". -->
<div lang="zh-hans" class="col1">
<!-- Colon + Open/Close/Middle -->
<div>国:(国</div>
<div>国:)国</div>
<div>国:・国</div>
<div>国: 国</div>
<!-- Open/Close/Middle + Colon -->
<div>国(:国</div>
<div>国):国</div>
<div>国・:国</div>
<div>国 :国</div>
</div>
<!-- The same content with "zh-hant". -->
<div lang="zh-hant" class="col2">
<!-- Colon + Open/Close/Middle -->
<div>国:(国</div>
<div>国:)国</div>
<div>国:・国</div>
<div>国: 国</div>
<!-- Open/Close/Middle + Colon -->
<div>国(:国</div>
<div>国):国</div>
<div>国・:国</div>
<div>国 :国</div>
</div>
</div>

Просмотреть файл

@ -8,21 +8,62 @@
#container {
font-family: halt-font;
font-size: 20px;
position: relative;
text-spacing-trim: space-all;
}
#container > div {
position: absolute;
top: 0;
}
.col1 {
left: 6em;
}
.col2 {
left: 12em;
}
halt {
font-feature-settings: 'halt' 1;
}
</style>
<div id="container">
<!-- Dot + Open/Close/Middle -->
<div>国。<halt></halt></div>
<div><halt></halt>)国</div>
<div><halt></halt>・国</div>
<div><halt></halt> 国</div>
<!-- Open/Close/Middle + Dot -->
<div>国(。国</div>
<div><halt></halt>。国</div>
<div>国・。国</div>
<div>国 。国</div>
<div lang="ja">
<!-- Dot + Open/Close/Middle -->
<div>国。<halt></halt></div>
<div><halt></halt>)国</div>
<div><halt></halt>・国</div>
<div><halt></halt> 国</div>
<!-- Open/Close/Middle + Dot -->
<div>国(。国</div>
<div><halt></halt>。国</div>
<div>国・。国</div>
<div>国 。国</div>
</div>
<!-- The same content with "zh-hans". -->
<div lang="zh-hans" class="col1">
<!-- Dot + Open/Close/Middle -->
<div>国。<halt></halt></div>
<div><halt></halt>)国</div>
<div><halt></halt>・国</div>
<div><halt></halt> 国</div>
<!-- Open/Close/Middle + Dot -->
<div>国(。国</div>
<div><halt></halt>。国</div>
<div>国・。国</div>
<div>国 。国</div>
</div>
<!-- The same content with "zh-hant". -->
<div lang="zh-hant" class="col2">
<!-- Dot + Open/Close/Middle -->
<div>国。<halt></halt></div>
<div>国。)国</div>
<div>国。・国</div>
<div>国。 国</div>
<!-- Open/Close/Middle + Dot -->
<div>国(。国</div>
<div><halt></halt>。国</div>
<div>国・。国</div>
<div>国 。国</div>
</div>
</div>

Просмотреть файл

@ -10,17 +10,58 @@
#container {
font-family: halt-font;
font-size: 20px;
position: relative;
}
#container > div {
position: absolute;
top: 0;
}
.col1 {
left: 6em;
}
.col2 {
left: 12em;
}
</style>
<div id="container">
<!-- Dot + Open/Close/Middle -->
<div>国。(国</div>
<div>国。)国</div>
<div>国。・国</div>
<div>国。 国</div>
<!-- Open/Close/Middle + Dot -->
<div>国(。国</div>
<div>国)。国</div>
<div>国・。国</div>
<div>国 。国</div>
<div lang="ja">
<!-- Dot + Open/Close/Middle -->
<div>国。(国</div>
<div>国。)国</div>
<div>国。・国</div>
<div>国。 国</div>
<!-- Open/Close/Middle + Dot -->
<div>国(。国</div>
<div>国)。国</div>
<div>国・。国</div>
<div>国 。国</div>
</div>
<!-- The same content with "zh-hans". -->
<div lang="zh-hans" class="col1">
<!-- Dot + Open/Close/Middle -->
<div>国。(国</div>
<div>国。)国</div>
<div>国。・国</div>
<div>国。 国</div>
<!-- Open/Close/Middle + Dot -->
<div>国(。国</div>
<div>国)。国</div>
<div>国・。国</div>
<div>国 。国</div>
</div>
<!-- The same content with "zh-hant". -->
<div lang="zh-hant" class="col2">
<!-- Dot + Open/Close/Middle -->
<div>国。(国</div>
<div>国。)国</div>
<div>国。・国</div>
<div>国。 国</div>
<!-- Open/Close/Middle + Dot -->
<div>国(。国</div>
<div>国)。国</div>
<div>国・。国</div>
<div>国 。国</div>
</div>
</div>