Commit Graph

9595 Commits

Author SHA1 Message Date
Garret Rieger e3e1ae8766 [subset] proposed update to subset set apis. 2021-08-27 10:34:58 -07:00
Garret Rieger 9db494f517
[subset] Update remaining subset input sets to use inversion for all. (#3172)
* [subset] Update remaining subset input sets to use inversion for all.

* [subset] Update flag help for remaining sets to mention -=.
2021-08-26 10:51:38 -06:00
Behdad Esfahbod 99356ea5f0
Merge pull request #3150 from harfbuzz/item-context-tests
[test] Add tests for item context
2021-08-25 17:19:06 -06:00
Behdad Esfahbod 1620698bd5 [subset-input] Minor format 2021-08-25 16:26:58 -06:00
Garret Rieger cd07070e41 [subset] Move plan unicodes and gids population to end of _populate_unicodes... 2021-08-25 14:42:00 -07:00
Behdad Esfahbod 4b5a81f13c [buffer] Fix hb_buffer_append() pre/post-context logic
Part of https://github.com/harfbuzz/harfbuzz/pull/3150
2021-08-25 15:20:54 -06:00
Garret Rieger 8f4f47df7c [subset] use inverted set for all unicodes.
Modify the code that handles input->unicodes to be safe with possibly inverted sets. Also adds --unicodes-= and --unicodes+= flags.
2021-08-25 13:34:05 -07:00
Behdad Esfahbod e9e6d66cd6 [subset] Minor internal parameter rename 2021-08-24 23:22:49 -06:00
Garret Rieger 59deb754b3 [subset] rename _collect_subset_layout to _collect_layout_indices.
Better describes what the function does.
2021-08-24 18:17:07 -06:00
Garret Rieger f2441a4b65 [subset] Remove retain all layout features flag.
Instead use inverted sets to handle requesting all features. Modifies feature collection in subset plan to intersect the set of requested features against the features in the font. This prevents iterating a fully filled feature tag set.
2021-08-24 18:17:07 -06:00
Behdad Esfahbod c90678cbc5 [set] One more try to fix things
That I don't let a "make check -j10" run finish before pushing things
out means either that we need to speed up our build / test process,
or I need a faster laptop...
2021-08-24 11:11:12 -06:00
Behdad Esfahbod 357976963e [set] One more try at fixing clear() on empty set 2021-08-24 10:59:31 -06:00
Garret Rieger fb07f8f876 During subset input creation check for set alloc failures and fail if encountered. 2021-08-24 10:59:14 -06:00
Behdad Esfahbod b5177d2147 [set] Fix seam exposed by previous commit 2021-08-24 10:43:37 -06:00
Behdad Esfahbod f0de40dd61 Whitespace 2021-08-24 10:35:33 -06:00
Behdad Esfahbod 8cdbea5580 [ot-shape-normalize] Move buffer out of hb_ot_shape_normalize_context_t 2021-08-24 10:35:33 -06:00
Behdad Esfahbod 10da9fd20d [ot-map] Whitespace 2021-08-24 10:35:33 -06:00
Behdad Esfahbod d3e09bf465 [set] Make all operators null-safe again
Changed my mind.

Also for hb_map_clear().

Part of https://github.com/harfbuzz/harfbuzz/pull/3162
2021-08-24 10:31:49 -06:00
Khaled Hosny 430224b1a0 [buffer] Handle pre/post-context in buffer_append
Fixes https://github.com/harfbuzz/harfbuzz/issues/1843
2021-08-24 02:11:17 +02:00
Behdad Esfahbod 33c82c7dad [ot-shape] Fix unused-var error when building without AAT
Fixes https://github.com/harfbuzz/harfbuzzjs/issues/45
2021-08-22 22:31:39 -06:00
Qunxin Liu 34e0b28fae [subset] make glyph-names option match fonttools behavior
Don't encode psNames that are contained in standard glyph names set
2021-08-20 01:30:23 -06:00
Behdad Esfahbod 829b0f3353
Merge pull request #3154 from harfbuzz/set-invert
Resurrect hb_set_invert()
2021-08-20 01:28:15 -06:00
Behdad Esfahbod 84c2a30214 [bit-set-invertible] Second try fixing previous() 2021-08-19 16:33:48 -06:00
Behdad Esfahbod 8f88747a5e [bit-set-invertible] Fix previous() iteration 2021-08-19 16:31:01 -06:00
Behdad Esfahbod 1d832693e1 [set] Protect against immutible null set with invertible addition 2021-08-19 16:02:30 -06:00
Behdad Esfahbod dc800ffd6c [bit-set] Remove TODO items we don't intend to finish 2021-08-19 15:41:27 -06:00
Behdad Esfahbod 92908c122b [bit-set-invertible] Remove extra check
We don't expect immutable / null set in this code.
2021-08-19 15:28:26 -06:00
Behdad Esfahbod 1babe80ed2 [bit-set-invertible] Fix last remaining corner-case 2021-08-19 15:18:32 -06:00
Behdad Esfahbod e8911d137c [bit-set-invertible] Implement a couple other missing corner cases
Also, in bit-set, don't compute population in is_equal/is_subset()
if we don't have it computed already.
2021-08-19 15:00:33 -06:00
Behdad Esfahbod 2579dc648f [bit-set-invertible] Move code around 2021-08-19 14:48:27 -06:00
Behdad Esfahbod 2dfc104236 [bit-set-invertible] Implement is_empty() for inverted case as well 2021-08-19 14:47:33 -06:00
Behdad Esfahbod ec4812a7d4 [bit-page] Remove unused inverted code 2021-08-19 13:32:44 -06:00
Behdad Esfahbod 87885e6f02 [bit-set-invertible] Fix next/previous() logic 2021-08-19 13:26:25 -06:00
Behdad Esfahbod ee4e331a6e [bit-set] Remove unused get_min(inverted) 2021-08-19 13:24:15 -06:00
Behdad Esfahbod eec1a25e71 [bit-set-invertible] Rewrite get_min/max() in terms of next/previous() 2021-08-19 13:24:00 -06:00
Behdad Esfahbod f09d5ed0f5 [algs] Remove hb_bitwise_non() 2021-08-19 13:06:10 -06:00
Behdad Esfahbod f4fd7baf7e [bit-set-invertible] Fix subtract() logic 2021-08-19 13:05:12 -06:00
Behdad Esfahbod f317d8e426 [bit-set-invertible] Fix intersect() logic 2021-08-19 13:01:07 -06:00
Behdad Esfahbod b21038d91d [bit-set-invertible] Rewrite next/previous_range() in terms of s.next/previous() 2021-08-19 11:24:17 -06:00
Behdad Esfahbod eb98bc1e32 [bit-set-invertible] Rewrite next/previous() using s.next/previous_range() 2021-08-19 11:19:24 -06:00
Behdad Esfahbod 248ad3bce5 [bit-set-invertible] Implement next/previous
This makes invertible set functionality complete.
2021-08-19 10:17:51 -06:00
Behdad Esfahbod c27f5b1288 [bit-set-invertible] Plug in next_range()/previous_range() 2021-08-19 10:01:24 -06:00
Behdad Esfahbod f6aa37159b [bit-set-invertible] Fix process logic for inverted
[# On branch set-invert
2021-08-19 01:12:25 -06:00
Behdad Esfahbod 060de189ec [bit-page] Fix sanitizer error
This essentially reverts 9449cfeefd

Problem was dereferencing pointer at end of array...
2021-08-19 00:58:34 -06:00
Behdad Esfahbod b119b48079 [bit-set-invertible] Add unlikely() around inverted checks 2021-08-19 00:51:24 -06:00
Behdad Esfahbod b94f24ec79 [bit-set-invertible] Implement set algebra 2021-08-19 00:48:00 -06:00
Behdad Esfahbod 6afefe1dc3 [algs] Remove unnecessary struct tag names 2021-08-19 00:27:03 -06:00
Behdad Esfahbod 8aa92ff8f0 [bit-set-invertible] Implement get_min/max 2021-08-18 23:01:06 -06:00
Behdad Esfahbod 18f50275ed [bit-set] Restructure get_min/max() in prep for adding inverted 2021-08-18 22:08:06 -06:00
Behdad Esfahbod 669b97d949 [bit-set-invertible] Implement iterator 2021-08-18 21:39:04 -06:00
Behdad Esfahbod c66894d7c9 [bit-set-invertible] Write a subset branch as dagger 2021-08-18 21:24:29 -06:00
Behdad Esfahbod c39d2f7a76 [bit-set-invertible] Implement add_array / add_sorted_array / intersects 2021-08-18 21:20:54 -06:00
Behdad Esfahbod 0efa614c04 [bit-set] Add del_array/del_sorted_array() 2021-08-18 21:18:32 -06:00
Behdad Esfahbod 48ad9eef1e [bit-set] Merge page_for_insert() into page_for() 2021-08-18 21:05:21 -06:00
Garret Rieger 280366ba6a Add TODO to update NN offsets to allow nulls. 2021-08-18 16:52:45 -06:00
Garret Rieger dc31920bbe Don't serialize null offsets in CPAL.
Fixes https://oss-fuzz.com/testcase-detail/5443213648330752
2021-08-18 16:52:45 -06:00
Khaled Hosny 80ff72f39d [doc] Misc fixes 2021-08-18 13:16:51 +02:00
Khaled Hosny 9aa6f8a93f 2.9.0 2021-08-18 09:32:04 +02:00
Behdad Esfahbod f0c3804fa2 [set] Add hb_bit_set_invertible_t and resurrect hb_set_invert()
Implementation is NOT complete yet.
2021-08-17 19:53:43 -06:00
Behdad Esfahbod b5cdbdc030 [set] Turn hb_set_t into instance of template taking implementation t 2021-08-17 10:53:08 -06:00
Behdad Esfahbod fad452bffb [set] Move main functionality into hb_bit_set_t
To add inversion on top in hb_invertible_set_t and use that as hb_set_t.
2021-08-17 10:47:18 -06:00
Behdad Esfahbod 9cc4da962f [object] Remove hb_object_is_inert() 2021-08-16 20:17:53 -06:00
Behdad Esfahbod 2d5ef05d67 Use !g_object_is_valid() instead of g_object_is_inert() 2021-08-16 20:13:58 -06:00
Behdad Esfahbod f6d6eff6a2 [object] Remove unused HB_REFERENCE_COUNT_INIT 2021-08-16 19:41:44 -06:00
Behdad Esfahbod f245dc4db8 [set] Whitespace 2021-08-15 18:59:58 -06:00
Behdad Esfahbod 9b390f8c40 [set] Move page_t into hb-bit-page.hh 2021-08-15 18:59:58 -06:00
Behdad Esfahbod 0c3e02ee2d [set] Add "inverted" to page_t::is_empty() 2021-08-15 18:59:58 -06:00
Behdad Esfahbod 9bd64fa077 [set] Add "inverted" to page_t::next/prev() 2021-08-15 18:59:58 -06:00
Behdad Esfahbod c88e7ec935 [set] Add page_t::elt_maybe_invert() 2021-08-15 18:59:58 -06:00
Behdad Esfahbod 9449cfeefd [set] Simplify page_t::next/prev() 2021-08-15 18:59:58 -06:00
Behdad Esfahbod 4394ee1f1d [set] Add inverted to page_t::get_min/max() 2021-08-15 18:59:58 -06:00
Behdad Esfahbod 0dcd9b15d9 [set] Add page_t::set_range() 2021-08-15 18:59:58 -06:00
Behdad Esfahbod cb273fd17c [set] Add page_t::set() 2021-08-15 18:59:58 -06:00
Behdad Esfahbod 32bbf53d9c [set] Minor rewrite one cmp() in term of other 2021-08-15 18:59:58 -06:00
Garret Rieger cb05c363d7 [subset] add some basic tests for the legacy subset methods. 2021-08-14 10:37:02 -06:00
Garret Rieger d18aad7ec5 [subset] restore old subsetting api methods.
These will be left in place until the 3.0.0 release.
2021-08-14 10:37:02 -06:00
Garret Rieger c0f3af91b8 [subset] speed up add_gid_and_children and adjust op limit.
Fix for fuzzer timeout: https://oss-fuzz.com/testcase-detail/5001604901240832.

- Operation limit is per glyph, so 100,000 should still be far more than needed.
- Switches from for(...) to while(...) loop for iteration. for(...) calls it.end() which in this case triggers a complete iteration.
- Cache CompositeGlyph size in the iterator to avoid needing to recalculate it.
2021-08-12 14:50:42 -06:00
Garret Rieger c08f1b8903 [map] fix incorrect population count in hash map.
If the same key was set twice the population was being incorrectly incremented.
2021-08-10 14:00:55 -06:00
Garret Rieger e39c3bde7b [subset] fix bug in parsing glyf flags.
the bytes of the flag stream were being treated as signed integers instead of unsigned as specified in the spec.
2021-08-10 12:57:07 -06:00
Ben Wagner f5ba1fabce Fix documentation of hb_subset_flags_t defaults
HB_SUBSET_FLAGS_DEFAULT is 0, and hb_subset_input_create_or_fail
initializes its flags to HB_SUBSET_FLAGS_DEFAULT, so currently all flags
are set to false by default. It has been decided that future flags will
also be false by default for simplicity (using NO_ in the name if
needed). Correct and simplify the documentation for hb_subset_flags_t to
reflect this.
2021-08-09 09:05:24 -06:00
Garret Rieger 8c0c217b5a [subset] fail reference blob in face builder if allocation for table sorting fails.
Fixes https://oss-fuzz.com/testcase-detail/5041767803125760
2021-08-06 15:54:41 -06:00
Garret Rieger e5bfd49ae5 [subset] don't allow table adds for tag == -1. 2021-08-05 17:49:37 -06:00
Garret Rieger 222b74f08f [subset] don't leak memory for duplicate tables. 2021-08-05 17:49:37 -06:00
Behdad Esfahbod f7a9c3ea93 [open-file] Use hb_is_source_of instead of hb_is_iterator 2021-08-05 13:05:07 -06:00
Behdad Esfahbod fa90cb8a31 Whitespace again 2021-08-05 12:31:06 -06:00
Behdad Esfahbod a110a47eb5 Whitespace 2021-08-05 12:28:39 -06:00
Behdad Esfahbod 2cb8c928d7 [face] Let hashmap derive invalid key/value types
Works now with the previous two fixes.
2021-08-05 12:27:22 -06:00
Behdad Esfahbod 95c888e192 [meta] Define hb_int_min for pointer types as nullptr 2021-08-05 12:27:02 -06:00
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.
2021-08-05 12:23:53 -06:00
Behdad Esfahbod baf2166a24 [meta] Use hb_true_type/hb_false_type more 2021-08-05 12:08:47 -06:00
Behdad Esfahbod 74ad5ddcd7 [face] Minor cleaning of previous commit 2021-08-05 11:51:54 -06:00
Garret Rieger c2ee1fdd40 [subset] remove unsed table_entry struct. 2021-08-05 11:47:07 -06:00
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.
2021-08-05 11:47:07 -06:00
Behdad Esfahbod 368e957887 [ot-shape] Add comment re `vert` feature 2021-08-05 10:41:18 -06:00
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.
2021-08-04 17:36:24 -06:00
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
2021-08-04 11:55:53 -06:00
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
2021-08-04 11:53:27 -06:00
Behdad Esfahbod e80c86ffa6 [coretext] Fix formatting 2021-08-04 10:25:06 -06:00
Simon Cozens 66aef2818e Support passing variations to coretext shaper 2021-08-04 10:24:40 -06:00
Behdad Esfahbod 62a535f154 [khmer] Fix comment
Fixes https://github.com/harfbuzz/harfbuzz/issues/3104
2021-08-03 10:11:43 -06:00
Behdad Esfahbod ee7473b8a4 [mutex] Remove unused HB_MUTEX_IMPL_INIT / HB_MUTEX_INIT
https://github.com/harfbuzz/harfbuzz/pull/3100#issuecomment-890089096
2021-07-30 12:55:28 -06:00
Behdad Esfahbod 0e37c07f4c Revert "Construct user_data in hb_object"
This reverts commit a78eb43c79.

See: https://github.com/harfbuzz/harfbuzz/pull/3100#issuecomment-890088227
2021-07-30 12:52:59 -06:00
Behdad Esfahbod 5dc4cd71cc [blob] Minor change in destruction
No semantic change.
2021-07-30 12:37:40 -06:00
Garret Rieger b63ac57174 [subset] bail if collection region indices is in error. 2021-07-29 18:30:37 -07:00
Garret Rieger f9d8e4a976 [subset] switch ..._set_flags to not take a mask. 2021-07-29 18:30:27 -07:00
Garret Rieger 46d4a5e673 [subset] Convert subset plan to use a flags bit set. 2021-07-29 18:02:34 -07:00
Garret Rieger 3d534b146c [subset] convert subset input flags into bit flags.
Store the flags in a bit set. Updates the public api to work with the bit set directly.
2021-07-29 18:02:34 -07:00
Ben Wagner a78eb43c79 Construct user_data in hb_object
hb_object's user_data is created lazily. The previous implementation of
hb_object_set_user_data created space for the user_data but did not
actually construct it. This means that hb_user_data_array_t's lock was
not constructed. If hb_mutex_t is backed by an implementation which
requires that it be constructed (not just zero initialized) then errors
will occur when taking the lock when setting the user data.

Change hb_object_set_user_data to construct the user_data in the created
space and hb_object_fini to call the destructor.
2021-07-29 16:03:56 -06:00
Behdad Esfahbod 30579f5a37 [set] Document & use open-ended del_range() 2021-07-29 11:19:13 -06:00
Behdad Esfahbod 2d54c34680 [subset/VarStore] Fix OOM in fuzzer test
The test in question is the one added in c68a00b92e.
Culprit is that it's allocating lots of memory because of region_indices that
are out-of-range anyway. So, try to filter those out first.
2021-07-29 00:49:36 -06:00
Behdad Esfahbod ff1fe25a5d [VarStore] Rename internal get_scalars() to get_region_scalars() 2021-07-29 00:49:36 -06:00
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