Garret Rieger
09474d8d7b
[subset] Fix fuzzer timeout in add_gid_and_children.
...
The composite glyph graph isn't check for max operations by sanitize so track an operations count during the graph traversal.
2021-07-27 13:30:06 -06:00
Behdad Esfahbod
c68a00b92e
[subset] Fix possible overflows in VarRegionList serialize
...
Fixes https://oss-fuzz.com/testcase-detail/5362189182566400
2021-07-27 13:28:09 -06:00
Behdad Esfahbod
4762fcb415
Merge pull request #3067 from googlefonts/glyph_names
...
[subset] support option --glyph-names
2021-07-26 11:48:55 -07:00
Behdad Esfahbod
aeec278453
Merge pull request #3068 from harfbuzz/hoi
...
[variations] Support multiple axes with same tag, aka HOI
2021-07-26 11:31:54 -07:00
Qunxin Liu
71b5509c19
[subset] support option --glyph-names
2021-07-23 13:57:39 -07:00
Behdad Esfahbod
b235511ed8
Merge pull request #3021 from googlefonts/stable_api
...
[subset] update hb_subset api with final changes before going stable.
2021-07-23 12:15:15 -07:00
Behdad Esfahbod
a9a607d360
[variations] Support multiple axes with same tag, aka HOI
...
The axes in fvar are in arbitrary order, NOT sorted. Hence have to
lsearch all entries.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1673
Fixes https://github.com/harfbuzz/harfbuzz/issues/2743
Test from https://github.com/ctrlcctrlv/FontForge-Higher-Order-Interpolation
2021-07-23 11:58:58 -07:00
Garret Rieger
9ab751ac9f
[subset] Remove hb_subset(). Leaving just hb_subset_or_fail().
2021-07-22 12:14:47 -07:00
Garret Rieger
aba2e13141
[subset] Remove hb_subset_input_get/set_overlaps_flag ().
2021-07-22 12:12:36 -07:00
Garret Rieger
7d82191f61
[subset] Remove hb_subset_input_get/set_name_legacy ().
2021-07-22 12:12:36 -07:00
Garret Rieger
942636ae13
[subset] Remove hb_subset_input_get/set_retain_gids.
2021-07-22 12:12:36 -07:00
Garret Rieger
77b4a1cd96
[subset] Remove hb_subset_input_get/set_desubroutinize.
2021-07-22 12:12:36 -07:00
Garret Rieger
8bf5d4d4f7
[subset] Remove hb_subset_input_get/set_drop_hints.
2021-07-22 12:12:36 -07:00
Behdad Esfahbod
79e8b30609
[ot-shape] Fix application of kern table if GPOS kern is missing
...
Was broken sometime after we implemented kerx and tweaking it.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3043
2021-07-16 16:29:44 -06:00
Garret Rieger
deee24fbef
[subset] Add missing FontName op code in top dict parsing.
...
Fix for #3058
2021-07-14 16:01:18 -06:00
Qunxin Liu
7416faceeb
[subset] fuzzer fix: https://oss-fuzz.com/testcase-detail/5715464591376384
2021-07-08 09:09:30 -07:00
Garret Rieger
0da9158f62
[subset] Remove OffsetTo::serialize().
...
Convert remaining uses of it to serialize_serialize() which correctly uses the object packer.
2021-06-30 14:05:48 -07:00
Qunxin Liu
eee7b459ee
[subset] add option --no-prune-unicode-ranges
2021-06-24 11:44:20 -07:00
Khaled Hosny
c3be28ea26
[ot-shape] Numeric runs native direction is LTR
...
See inline comments. Slightly modified version of the code from Jonathan
Kew on the linked issue.
Fixes https://github.com/harfbuzz/harfbuzz/issues/501
2021-06-23 13:11:27 -07:00
Khaled Hosny
71a6296620
[tests] Make record-test.sh work with .otf files
...
It hard-codes the file extension, but fonttools sunset will use .otf for
CFF fonts, so hard-code the output file from subset as well.
2021-06-23 13:11:27 -07:00
Garret Rieger
bc06af977f
[subset] speed up feature collection when tags are specified.
...
Precompute a feature index filter to avoid needing to iterate the feature tag list for each encountered feature index. For this particular fuzzer case speeds up feature collection from 50s to 2s.
2021-06-20 17:45:19 -07:00
Garret Rieger
d2397d91f3
[subset] Add additional colrv1 subsetting tests that has a glyph with components.
2021-06-18 22:34:00 -07:00
Qunxin Liu
d07f789ae3
[subset] support option "--notdef-outline"
2021-06-18 15:35:02 -07:00
Garret Rieger
675ebbeb3a
[subset] don't alloc zero bytes.
...
It will be leaked later since hb_blob_create() won't set up the blob to cleanup since it has length zero.
2021-06-16 17:35:39 -06:00
Behdad Esfahbod
bdfed8f113
[blob] Add failing versions of create API
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2567
New API:
+hb_blob_create_or_fail()
+hb_blob_create_from_file_or_fail()
Use these in util/ to distinguish empty file from not-found file.
Only err on the latter.
2021-06-15 13:56:30 -06:00
Behdad Esfahbod
5bc05ba155
Prefer GPOS over kerx, if GSUB was applied
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3008
2021-06-13 05:28:20 -06:00
David Corbett
5585ea02eb
[syllabic] Set position of dotted circle for Indic
2021-06-06 10:35:59 -07:00
Qunxin Liu
35d6af6943
[subset] fix fuzzer testcase: https://oss-fuzz.com/testcase-detail/5965777994907648
2021-06-04 18:16:23 -06:00
Qunxin Liu
1b6008ca62
fix fuzzer testcase: https://oss-fuzz.com/testcase-detail/5417934246772736
2021-06-02 17:32:16 -06:00
Qunxin Liu
7ab0f4eda9
fuzzer fix
2021-05-31 12:44:33 -06:00
Qunxin Liu
cb5a6b5a27
[subset] support option --layout-features
2021-05-26 18:04:18 -06:00
Garret Rieger
0989b5553a
[subset] Add test for overlaps flag setting.
2021-05-26 16:04:56 -06:00
Qunxin Liu
f739e1dc6a
[subset] subset both CPAL and COLRv1
2021-05-26 15:39:42 -06:00
Kurt Kartaltepe
2000f47ae5
[set] Compute is_subset by comparing pages.
...
Test subsets one page at a time instead of by codepoints. On my machine
this is about 250x faster than the previous implementation.
2021-05-26 14:15:25 -06:00
Jonathan Kew
89df353996
[aat] Add testcase for Apple Color Emoji couple-with-skin-tones sequence.
2021-05-17 21:44:29 -06:00
Garret Rieger
a08900b721
[subset] fix failing colrv0 subsetting when font has composite glyphs.
...
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.
2021-05-10 15:33:54 -06:00
Garret Rieger
b07b97d5d7
[subset] Add more Noto Nastaliq test cases.
2021-05-06 14:24:45 -06:00
Garret Rieger
2b7647649a
[subset] update test-subset-gpos expected files.
2021-04-30 14:46:57 -06:00
Garret Rieger
92757f6809
[subset] Don't drop anchor device tables when dropping hints. These may contain variation data.
...
Update subseting expected files to match latest version of fontTools.
2021-04-23 18:50:33 -07:00
Garret Rieger
6fddc2bbf9
[subset] subset layout tables (G*) by default.
2021-04-22 15:08:49 -07:00
Garret Rieger
425ba1f4ab
[subset] fixes infinite loop in hb_set_get_max().
...
Fixes https://oss-fuzz.com/testcase-detail/5363902507515904
2021-04-20 13:18:07 -06:00
Garret Rieger
ec4321068b
[subset] fix infinite loop caused by alloc failure in repacker.
...
Fixes: https://oss-fuzz.com/testcase-detail/5609112151916544 .
2021-04-20 13:18:07 -06:00
Garret Rieger
0e845d973e
[subset] fix memory leak in repacker caused by failed alloc.
...
Fixes: https://oss-fuzz.com/testcase-detail/5616763250278400 .
2021-04-20 13:18:07 -06:00
Garret Rieger
3fb62cdc14
[subset] fail on offset overflow in tables that we don't repack.
...
Fixes: https://oss-fuzz.com/testcase-detail/5229304507138048
2021-04-19 17:01:05 -06:00
Behdad Esfahbod
47cbf8f2c4
[test] Silence more compiler warnings
2021-04-16 13:32:02 -06:00
Qunxin Liu
9dc9f0385d
[subset] fix for fuzzer testcase: https://oss-fuzz.com/testcase-detail/5858518134554624
2021-04-09 11:07:28 -06:00
Qunxin Liu
4af5dacedc
[subset] add fuzzer testcase
2021-04-07 13:02:04 -06:00
Garret Rieger
64122b5a44
[subset] don't visit lookup if covered glyph set has failed.
...
If covered glyph set is in error then the same lookup can be recursed into repeatedly potentially causing a fuzzer timeout. Fixes: https://oss-fuzz.com/testcase-detail/5416421032067072 .
2021-04-06 12:34:44 -06:00
Garret Rieger
4ec18c85e6
[subset] add subsetting tests with drop hints and layout subsetting enabled.
2021-04-06 11:50:44 -06:00
Garret Rieger
71d6d15600
[subset] clamp distance to prevent shifting outside of the limits of int64.
...
Fixes https://oss-fuzz.com/testcase-detail/4961171477233664 .
2021-04-06 11:48:39 -06:00