Behdad Esfahbod
167f58a2ca
[util] Move subset options into subset-options.hh
3 years ago
Behdad Esfahbod
370e961faf
[util/hb-subset] Use hb-subset.h public API instead of poking inside
...
Oops.
3 years ago
Behdad Esfahbod
4e97678ebb
[util] Use inheritence to embed inherent options of objects
3 years ago
Behdad Esfahbod
06d661803c
[util] Fix compiler error
...
../util/options.cc:588:3: error: narrowing conversion of ‘font_size_flags’ from ‘unsigned int’ to ‘gint {aka int}’ inside { } [-Werror=narrowing]
3 years ago
Behdad Esfahbod
c5337c43e9
[util] Fold helper-cairo.cc into helper-cairo.hh
3 years ago
Behdad Esfahbod
c329ce1000
[util] Also hide ppem settings in hb-ot-shape-closure
...
Leaving ptem, as that can in theory change shape closure if we apply it
to optical-size axis (we currently don't).
3 years ago
Behdad Esfahbod
c40e00796c
[util] Fold helper-cairo-ansi.cc into helper-cairo-ansi.hh
3 years ago
Behdad Esfahbod
4fe43ccbf1
[util] Fold ansi-print.cc into ansi-print.hh
3 years ago
Behdad Esfahbod
b1db0e4a0f
[util] Fold view-cairo.cc into view-cairo.hh
3 years ago
Behdad Esfahbod
6500f68f1f
[util] Change hb-subset to use face_options_t instead of font_options_t
3 years ago
Behdad Esfahbod
869e20e09f
[util] separate face options from font options
3 years ago
Behdad Esfahbod
b3a2f2bfcf
[util/main-font-text] Simplify
3 years ago
Behdad Esfahbod
71440dbd90
[util] Move font-size and upem to be extern variables
3 years ago
Behdad Esfahbod
fc0339eef0
[util] Simplify shape-consumer by removing buffer arg
3 years ago
Behdad Esfahbod
e014c6fa2d
[util/main-font-text] Move eol from template arg to main() arg
3 years ago
Behdad Esfahbod
463411a1de
[util] Remove unused option_group_t
3 years ago
Behdad Esfahbod
8588173ee6
[util] Rework post_parse() handling
3 years ago
Behdad Esfahbod
3362b48f5a
[util] Templatize add_group logic
3 years ago
Behdad Esfahbod
fe90fbeba3
[util] Remove unused pre_parse callback logic
3 years ago
Behdad Esfahbod
09e4d7dd30
[util] Simplify output_options_t
3 years ago
Behdad Esfahbod
e109f9a6f9
[util] Collect cmdline arg options outside of constructor
3 years ago
Behdad Esfahbod
e57dd66889
[util] Initialize struct members inline
3 years ago
Behdad Esfahbod
21f1054d47
[util/hb-subset] Keep face around instead of font
3 years ago
Garret Rieger
8c0c217b5a
[subset] fail reference blob in face builder if allocation for table sorting fails.
...
Fixes https://oss-fuzz.com/testcase-detail/5041767803125760
3 years ago
Garret Rieger
e5bfd49ae5
[subset] don't allow table adds for tag == -1.
3 years ago
Garret Rieger
222b74f08f
[subset] don't leak memory for duplicate tables.
3 years ago
Behdad Esfahbod
f7a9c3ea93
[open-file] Use hb_is_source_of instead of hb_is_iterator
3 years ago
Behdad Esfahbod
fa90cb8a31
Whitespace again
3 years ago
Behdad Esfahbod
a110a47eb5
Whitespace
3 years ago
Behdad Esfahbod
2cb8c928d7
[face] Let hashmap derive invalid key/value types
...
Works now with the previous two fixes.
3 years ago
Behdad Esfahbod
95c888e192
[meta] Define hb_int_min for pointer types as nullptr
3 years ago
Behdad Esfahbod
407a112e7b
[meta] Make hb_is_signed/hb_is_unsigned work on all types
...
They were failing if type was non-scalar, eg. pointer.
3 years ago
Behdad Esfahbod
baf2166a24
[meta] Use hb_true_type/hb_false_type more
3 years ago
Behdad Esfahbod
74ad5ddcd7
[face] Minor cleaning of previous commit
3 years ago
Garret Rieger
c2ee1fdd40
[subset] remove unsed table_entry struct.
3 years ago
Garret Rieger
dea0fe5717
[subset] discard extra copies of a table in face builder.
...
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.
3 years ago
Behdad Esfahbod
368e957887
[ot-shape] Add comment re `vert` feature
3 years ago
Garret Rieger
2c024dc3cb
[subset] prune redundant cmap12 subtables.
...
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.
3 years ago
Khaled Hosny
84946e4d2c
[test] Suggest updating the expectation if ttx matches
...
https://github.com/harfbuzz/harfbuzz/issues/3089#issuecomment-892208892
3 years ago
Behdad Esfahbod
09c3b82f5e
[buffer] When shifting forward, leave no gap
...
Trying to see if this fixes the fuzzer issue:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36236
3 years ago
Behdad Esfahbod
5086e10538
[test] Add failing fuzzer test case
...
From https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36236
https://oss-fuzz.com/testcase-detail/5061207689134080
3 years ago
Behdad Esfahbod
a150baf32c
[ot-map] Allocate top mask bit as global bit
...
Avoids undefined-shift of 32 in the following line:
map->mask = (1u << (next_bit + bits_needed)) - (1u << next_bit)
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1219263
3 years ago
Khaled Hosny
f698fe5aee
[test] Always fail subset tests if hashes don’t match
...
Regardless of the pre sentience or absence of fonttools.
3 years ago
Behdad Esfahbod
e80c86ffa6
[coretext] Fix formatting
3 years ago
Behdad Esfahbod
db6fbe29e4
[util/hb-subset] Use driver_t<> in outer block as well
...
a363ce573c (r54282223)
3 years ago
Simon Cozens
66aef2818e
Support passing variations to coretext shaper
3 years ago
Behdad Esfahbod
f25daa4794
Merge pull request #3110 from harfbuzz/subset-tests-fast
...
[test] Make subset tests fast
3 years ago
Khaled Hosny
9f544e5008
[test] Don’t skip subset tests early
...
Check for FontTools only when the checksums are mismatching.
3 years ago
Khaled Hosny
b084153317
[test] Remove subset tests from the slow suite
3 years ago
Khaled Hosny
7ccc52b075
[test] Compare sha256 hash before TTX dumps
...
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.
3 years ago