Commit graph

9384 commits

Author SHA1 Message Date
Khaled Hosny
9a7ff54bb7 [test] Write one sequence per-line
https://github.com/harfbuzz/harfbuzz/pull/3087#issuecomment-888691436
2021-07-28 18:25:51 -06:00
Khaled Hosny
ddf87ffb22 [test] Add generated tests for emoji clusters
Fixes https://github.com/harfbuzz/harfbuzz/issues/3017

Uses AdobeBlank2.ttf from:

  https://github.com/adobe-fonts/adobe-blank-2

instead of a dummy empty font so that everything maps to GID 1 and
control code points are kept instead of being dropped because there is
not space glyph (otherwise we’d need to identify control code points
somehow when generating the expectations).
2021-07-28 18:25:51 -06:00
Behdad Esfahbod
f0a1892ff9 [serialize] Remove unnecessary pointer indirection 2021-07-28 17:36:22 -06:00
Behdad Esfahbod
1c511ed6f6 [subset] Simplify VarStore serialization 2021-07-28 17:33:26 -06:00
Behdad Esfahbod
ad4c692492 [subset] Simplify VarStore serialize 2021-07-28 17:22:14 -06:00
Behdad Esfahbod
25dee60977 [sanitize] Revert some from c68a00b92e
That overflow check was already happening in arrayZ.sanitize().
2021-07-28 13:58:24 -06:00
Behdad Esfahbod
6fe0d7d6e8 [GSUB] If MultipleSubst is applied to a ligature-component, preserve lig-id
Fixes https://github.com/harfbuzz/harfbuzz/issues/3069
2021-07-28 12:06:49 -06:00
Behdad Esfahbod
b926fb9bb0 Whitespace 2021-07-28 11:58:10 -06:00
Behdad Esfahbod
cc3a7ceea3 Fix macro-in-macro invocation
../src/hb-ot-color-colr-table.hh:980:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
\#if COLRV1_ENABLE_SUBSETTING == 1
2021-07-28 11:53:06 -06:00
Behdad Esfahbod
087e2705de Fix signed-ness error in 0ded6a70c8 2021-07-28 11:42:48 -06:00
Garret Rieger
f3e031539f Revert "[ci] Bin FontTools version due to recent COLRv1 changes"
This reverts commit 163748b505.
2021-07-28 11:36:34 -06:00
Garret Rieger
acbd8b27dc [subset] temporarily disable COLRv1 subsetting.
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.
2021-07-28 11:36:34 -06:00
Behdad Esfahbod
0ded6a70c8 [subset] Fix another fuzzer issue
Addition could overflow on 32bit arch.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36636
Fixes https://oss-fuzz.com/testcase-detail/5072358514753536
2021-07-28 11:35:27 -06:00
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
7b8464b655 [serialize] Check for overflow in allocate_size()
If size was > INT_MAX, then the out-of-room check was failing to perform
as intended.

Part of fixing https://oss-fuzz.com/testcase-detail/5362189182566400
2021-07-27 13:26:00 -06:00
Behdad Esfahbod
bf2c87bfe6 Add hb_memcpy() that does len=0 check 2021-07-27 13:26:00 -06:00
Khaled Hosny
5f801da945 [hb-ms-features] Move code out of header file 2021-07-27 21:07:32 +02:00
Khaled Hosny
990c15dbe5 [hb-ms-features] Rename types to be less general 2021-07-27 21:07:32 +02:00
Khaled Hosny
69199211b7 [uniscribe/directwrite] Move feature setup to shared file
Fixes https://github.com/harfbuzz/harfbuzz/issues/3070
2021-07-27 21:07:32 +02:00
Garret Rieger
fc7f778120
[subset] add a note to hb-subset on what is and isn't supported (#3076) 2021-07-27 11:21:19 -07:00
Khaled Hosny
791a1bf3a4 Don’t disable getenv on Windows
The condition is inverted, regression from
40ec187dec.
2021-07-27 15:22:13 +02: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
Khaled Hosny
ec99fdb7e8 [sebset] Use [s|g]et_flag for retain_all_layout_features
Looks like this was missed when adding hb_subset_input_[s|g]et_flag()
2021-07-26 19:32:28 +02:00
Khaled Hosny
acc7100a3f [docs] Improve subset documentation 2021-07-26 02:18:23 +02:00
Khaled Hosny
3e2734cf91 [docs] Don’t use GTK-Doc syntax for internal functions
We don’t generate docs for them, reduces the number of warnings.
2021-07-26 02:18:18 +02: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
1fde80ad28 [subset] update comments referencing hb_subset_input_t parameter. 2021-07-22 16:45:48 -07:00
Garret Rieger
c581d11eba [set] in hb_set_set() avoid calling memcpy on nullptr. 2021-07-22 14:04:39 -07:00
Garret Rieger
2b9cb29923 [subset] cleanup no_subset_tables on destruction. 2021-07-22 13:26:03 -07:00
Garret Rieger
89fc399eba [subset] Add hb-subset section documentation. 2021-07-22 13:00:34 -07:00
Garret Rieger
792e2ed61c [subset] convert no get/set prune unicode ranges to enum. 2021-07-22 12:41:48 -07:00
Behdad Esfahbod
0a44feaeda [fvar] Make find_axis_index() return a range, not individual value 2021-07-22 12:18:48 -07:00
Garret Rieger
1b6c1aa684 [subset] add hb-subset api to documentation generator.
Standardize subset_input parameter to be input.
2021-07-22 12:15:45 -07:00
Garret Rieger
8ce9683412 [subset] add documentation for all hb-subset.h methods. 2021-07-22 12:14:53 -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
e5c887fc0f [subset] add documentation for subset input flag enums. 2021-07-22 12:14:09 -07:00
Garret Rieger
372722ceee [subset] move notdef_outline to the subset input property enum. 2021-07-22 12:14:03 -07:00
Garret Rieger
a6c6cda486 [subset] Add no subset tables and passthrough unrecognized tables to the subset api.
Matches fontTools options.
2021-07-22 12:12:37 -07:00
Garret Rieger
668f2bd93e [subset] Add hb_subset_or_fail () to public subset api. 2021-07-22 12:12:36 -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
Garret Rieger
9fb3a25633 [subset] Use hb_set_copy in subset input. 2021-07-22 12:12:36 -07:00
Garret Rieger
38de3491a0 [subset] add implementation for get/set flag on subset input. 2021-07-22 12:12:36 -07:00