Fixes#2361. Stores tables in the builder in a hashmap so you end up with at most one copy of each table. Table serialization order is now based on tag sort order instead of order of insertion into the builder.
If the post subset cmap12 table is equivalent to another cmap subtable don't include the 12 table in the final subset. Matches change https://github.com/fonttools/fonttools/pull/2146 from fontTools.
Most of time the files are identical, so instead of comparing the TTX
dump we can check sha256 hashes of the files first and if they match, we
don’t have to check the TTX dumps at all, making the subset tests orders
of magnitude faster.
time meson test --suite=subset down from:
real 0m19.418s
user 0m38.171s
sys 0m3.587s
to:
real 0m3.102s
user 0m8.622s
sys 0m1.701s
The expected files have been replaced by hb-subset output so they are
bit-identical where FontTools output might not.
The generate-expected-outputs.py now compares the hb-subset output with
fontttols subset and errors of they don’t match.
time meson test --suite=subset down from:
real 0m22.822s
user 0m44.561s
sys 0m9.255s
to:
real 0m19.418s
user 0m38.171s
sys 0m3.587s
Does not seem to help much, but it is something.
Part of https://github.com/harfbuzz/harfbuzz/issues/3089
Speed-up subset tests by saving TTX dump of expected output instead of
generating it each time the tests are run.
Cuts down meson test --suite=subset on my system from:
real 0m38.977s
user 1m12.024s
sys 0m10.547s
to:
real 0m22.291s
user 0m44.548s
sys 0m9.221s
Part of https://github.com/harfbuzz/harfbuzz/issues/3089
Currently COLRv1 spec is being changed so the subsetting implementation is out of sync. Disable subsetting by failing sanitization for COLRv1 tables and disable all colrv1 tests.
Composite glyph collection was happening along side colrv0 glyph collection which meant it was possible to miss grabbing the component glyphs for a glyph added by colrv0.
previously remove_redundant_sys () is missing in harfbuzz, after
redundant langsys removal, some features are removed as well in
prune_features() in fonttools. This change is trying to get the same
result between harfbuzz and fonttools.
- subset class def 1 against the coverage table.
- Don't re-use class 0 in class def 2.
- Ignore class 0 glyphs for the purposes of determing format 1 vs format 2 encoding for ClassDef.
Add an additional test case which demonstrates these issues.
A regression from 7b77ce0507.
It was caught by the CI build in the PR, but apparently we are now used
to CI failures that they are effectively ignored.
Also, yay for multiple build systems.