diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /testing/web-platform/tests/fonts | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/fonts')
-rw-r--r-- | testing/web-platform/tests/fonts/math/stretchy.woff | bin | 1428 -> 1464 bytes | |||
-rw-r--r-- | testing/web-platform/tests/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-min.otf | bin | 0 -> 40336 bytes | |||
-rw-r--r-- | testing/web-platform/tests/fonts/noto/cjk/README.md | 20 | ||||
-rwxr-xr-x | testing/web-platform/tests/fonts/noto/cjk/subset.sh | 22 |
4 files changed, 27 insertions, 15 deletions
diff --git a/testing/web-platform/tests/fonts/math/stretchy.woff b/testing/web-platform/tests/fonts/math/stretchy.woff Binary files differindex eb67181e1e..ac7d908f6e 100644 --- a/testing/web-platform/tests/fonts/math/stretchy.woff +++ b/testing/web-platform/tests/fonts/math/stretchy.woff diff --git a/testing/web-platform/tests/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-min.otf b/testing/web-platform/tests/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-min.otf Binary files differnew file mode 100644 index 0000000000..1ec5a7dbea --- /dev/null +++ b/testing/web-platform/tests/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-min.otf diff --git a/testing/web-platform/tests/fonts/noto/cjk/README.md b/testing/web-platform/tests/fonts/noto/cjk/README.md index a14fa64b42..c053ea8359 100644 --- a/testing/web-platform/tests/fonts/noto/cjk/README.md +++ b/testing/web-platform/tests/fonts/noto/cjk/README.md @@ -4,26 +4,16 @@ Fonts in this directory help testing the `text-spacing-trim` property. ## NotoSansCJKjp-Regular-subset-halt.otf -This font is generated by the following command: -``` -pyftsubset NotoSansCJKjp-Regular.otf \ - --unicodes=20-7E,2018-201F,56FD,6C34,3000-301F,30FB,FF01-FF1F,FF5B-FF65 \ - --layout-features+=halt,fwid,hwid,palt,pwid,vhal,vpal \ - --output-file=NotoSansCJKjp-Regular-subset-halt.otf -``` -where `pyftsubset` comes from https://github.com/fonttools/fonttools +Please see `subset.sh` to generate. ## NotoSansCJKjp-Regular-subset-chws.otf This font has `chws` and `vchw` in addition to the font above. -This font is generated by the following command: -``` -pyftsubset NotoSansCJKjp-Regular.otf \ - --unicodes=20-7E,2018-201F,56FD,6C34,3000-301F,30FB,FF01-FF1F,FF5B-FF65 \ - --layout-features+=halt,fwid,hwid,palt,pwid,vhal,vpal,chws,vchw \ - --output-file=NotoSansCJKjp-Regular-subset-chws.otf -``` Note there are two variants of Noto CJK; one with `chws` and one without. The input font for this command must be the one with `chws`, processed by the [chws_tool](https://github.com/googlefonts/chws_tool). + +## NotoSansCJKjp-Regular-subset-halt-min.otf + +This font is to test web fonts scenario where not all glyphs are available. diff --git a/testing/web-platform/tests/fonts/noto/cjk/subset.sh b/testing/web-platform/tests/fonts/noto/cjk/subset.sh new file mode 100755 index 0000000000..c348406676 --- /dev/null +++ b/testing/web-platform/tests/fonts/noto/cjk/subset.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Produces subset font files for testing the `text-spacing-trim` property. +# +# Requires `pyftsubset` from <https://github.com/fonttools/fonttools>. +# +range="--unicodes=20-7E,2018-201F,56FD,6C34,3000-301F,30FB,FF01-FF1F,FF5B-FF65" +subrange="--unicodes=20-7E,56FD,FF08-FF09" +features="--layout-features+=halt,fwid,hwid,palt,pwid,vhal,vpal" +features_chws="$features,chws,vchw" +for path in "$@"; do + filename="$(basename -- "$path")" + stem="${filename%.*}" + output_halt="$stem-subset-halt.otf" + output_chws="$stem-subset-chws.otf" + output_min="$stem-subset-halt-min.otf" + (set -x; + pyftsubset "$path" $range $features --output-file="$output_halt" + pyftsubset "$path" $range $features_chws --output-file="$output_chws" + pyftsubset "$output_halt" $subrange $features --output-file="$output_min" + ) +done |