Commit Graph

249 Commits

Author SHA1 Message Date
Qunxin Liu df55f840cb [instance] instantiate STAT table when axes are pinned at fixed locations
restricting ranges is not supported yet.
2022-07-18 14:59:07 -06:00
Qunxin Liu 2a4773e43d add option "--instance", store axes_location in subset_plan and drop all
variation tables when all axes are pinned at default
2022-07-18 14:59:07 -06:00
Behdad Esfahbod ac216972ab [subset] Add table size blowup bound
Fixes https://github.com/harfbuzz/harfbuzz/issues/3091
2022-07-13 15:32:19 -06:00
Garret Rieger 29f149c16c [subset] cache sanitized tables in subset plan to avoid sanitizing tables multiple times. 2022-07-08 13:42:38 -06:00
Garret Rieger 5fdae68481 [reorg] Move GSUB.hh up one level and change GSUB namespace to GSUB_impl. 2022-06-30 15:33:20 -06:00
Garret Rieger 3fbf2dece7 [reorg] Move OT::Layout::GPOS_impl::GPOS to OT::Layout::GPOS. 2022-06-28 18:47:50 -06:00
Garret Rieger 88ef3c5a9a [reorg] Change OT::Layout::GPOS to OT::Layout::GPOS_impl. 2022-06-28 18:47:50 -06:00
Garret Rieger 74f45f7c2a [reorg] Move remaining GPOS lookup types to new directory. 2022-06-28 18:47:50 -06:00
Behdad Esfahbod e9c0a74063 Fix clang -Wcomma warnings
Fixes https://github.com/harfbuzz/harfbuzz/issues/3656
2022-06-15 17:28:36 -06:00
Garret Rieger e00c7358a0 [subset] special case table presence check for hb_face_create_from_tables faces. 2022-05-25 22:39:00 +00:00
Garret Rieger 6a149a09e7 [subset] fix use of lazy static constructor. 2022-05-25 22:22:35 +00:00
Garret Rieger d4c7939eb7 [subset] use a list of known tables instead of handled tables. 2022-05-25 22:11:32 +00:00
Garret Rieger 3472f73b79 [subset] also include no subset tables when guessing which tables are present. 2022-05-25 21:52:48 +00:00
Garret Rieger 9564d98739 [subset] fix subsetting of faces created via hb_face_create_for_tables.
Fixes #3609.
2022-05-25 21:16:37 +00:00
Behdad Esfahbod c78d8ba60b [subset] Allocate same size as source table for GSUB/GPOS/name 2022-05-11 13:05:41 -06:00
Behdad Esfahbod 2e7f1ae48f [subset] Use vector.allocated size instead of tracking buf_size 2022-05-11 12:52:27 -06:00
Behdad Esfahbod aeb50b8942 [subset] Retain buffer across table subset operations 2022-05-11 12:14:49 -06:00
Garret Rieger b342adeb96 [reorg] Move GSUB into OT::Layout::GSUB namespace. 2022-03-23 18:05:24 -06:00
Khaled Hosny 8d1b000a3e 4.0.0 2022-03-01 21:27:32 +02:00
Garret Rieger fc1548cf71 [subset] document return values. 2022-02-17 17:16:31 -08:00
Garret Rieger 670ef070bd [subset] Change subset plan create to be or_fail. 2022-02-11 16:01:33 -08:00
Garret Rieger ae8d373bcf [subset] add subset plan reference, set/get user data functions. 2022-02-11 14:54:23 -08:00
Garret Rieger b65e48a786 [subset] Add subset plan to public API.
Add the ability to create a subset plan which an be used to gather info on things like glyph mappings in the final subset. The plan can then be passed on to perform the subsetting operation.
2022-02-11 14:37:21 -08:00
Garret Rieger fa966bcc29 [repacker] create repacker output buffer after final length is known.
Don't rely on a buffer provided by the caller, as it may not be large enough.
2021-12-06 21:27:28 -07:00
Garret Rieger 41bbf2812e [repacker] do extension subtable isolation before starting resolution attempts. 2021-09-22 18:18:50 -06:00
Qunxin Liu ca7b9daef0 [subset] subset MATH table 2021-09-22 18:08:30 -04:00
Garret Rieger d700646c33 [subset] In preperation for 3.0.0 release remove legacy subsetting api methods. 2021-09-16 15:31:29 -06:00
Khaled Hosny 9aa6f8a93f 2.9.0 2021-08-18 09:32:04 +02: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 46d4a5e673 [subset] Convert subset plan to use a flags bit set. 2021-07-29 18:02:34 -07: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
Qunxin Liu 71b5509c19 [subset] support option --glyph-names 2021-07-23 13:57:39 -07:00
Garret Rieger 89fc399eba [subset] Add hb-subset section documentation. 2021-07-22 13:00:34 -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 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 edb57a8d9a Make subset input const in the subsetting operation. Don't modify the subset input's sets. 2021-07-22 12:11:43 -07:00
Qunxin Liu 7ab0f4eda9 fuzzer fix 2021-05-31 12:44:33 -06:00
Qunxin Liu f739e1dc6a [subset] subset both CPAL and COLRv1 2021-05-26 15:39:42 -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
Garret Rieger 3c8273ab68 Check for alloc failures on the gsub/gpos_langsys maps in subset plan creation. 2021-03-25 16:53:56 -06:00
Garret Rieger b14475d2ae [subset] further changes to serializer error handling.
- Rename enum type and enum members.
- in_errors() now returns true for any error having been set. hb-subset now looks for offset overflow only errors to divert to repacker.
- Added INT_OVERFLOW and ARRAY_OVERFLOW enum values.
2021-03-18 10:51:26 -07:00
Garret Rieger 73ed59f7a6 [subset] store errors in the serializer as a flag set.
Make check_assign/check_equal specify the type of error to set.
2021-03-17 15:58:34 -07:00
Garret Rieger 832f2b599b [subset] Refactor _subset () to reduce nesting and eliminate the use of 'goto'. 2021-03-17 15:53:58 -07:00
Garret Rieger 6e9468fcfb [subset] cleanup memory leaks in the repacker. 2021-03-17 15:53:58 -07:00
Garret Rieger dd8e5d0e1b [subset] Only run the repacker for GSUB/GPOS. 2021-03-17 15:53:57 -07:00
Garret Rieger 6b1ea4cbe7 [subset] hook up the repacker to run if offset overflows are encountered during subsetting. 2021-03-17 15:53:57 -07:00
Garret Rieger dae32b4f12 [subset] bail out of subsetting if plan allocation fails. 2020-07-29 06:37:25 +04:30
Qunxin Liu 8b5d3ebd96 [subset] GSUB5/GPOS7 Contextual Subst/Pos Subtbale Subsetting support 2020-05-20 15:12:54 -07:00
Ebrahim Byagowi e642aab116
[subset] Add source_blob as a hb_subset_context_t field (#2203)
So no more double sanitizing source table.
2020-02-28 22:24:25 +03:30