src/hb-subset.cc


Log

Author Commit Date CI Message
Behdad Esfahbod 415ea36a 2025-07-24T23:21:36 [subset] Break up hb-subset.cc
Behdad Esfahbod 9aa9fc51 2025-07-24T22:47:08 [subset] Move code around
Behdad Esfahbod 367300ec 2025-07-24T22:33:19 [subset] Move code around
Behdad Esfahbod d9304b69 2025-04-05T20:02:30 [subset] Fix i686 oss-fuzz build hopefully
Garret Rieger a1e587b7 2025-03-31T22:02:11 [subset] Add hb_subset_cff_get_charstrings_index and hb_subset_cff2_get_charstrings_index. These methods allow retrieving the entire charstrings index structure from a CFF or CFF2 table.
Garret Rieger 283ab218 2025-03-27T22:14:58 [subset] remove CFF/CFF2 table presence checks. Not needed now that we are checking accelerator validity.
Garret Rieger ae8b288d 2025-03-27T22:07:01 [subset] Correctly handle lifetime of charstrings data blob returned by hb_subset_cff_get_charstring_data.
Garret Rieger 0d4053b1 2025-03-27T18:45:12 [subset] Add hb-subset.h API for retrieving the raw per glyph outline data from CFF and CFF2.
Behdad Esfahbod d2a88fbd 2025-02-12T21:48:22 [vector] Add alloc_exact()
Garret Rieger 0b7beefd 2024-11-22T01:00:57 Raise table growth limit during subsetting. Real case encountered that exceeded the current limit. Fixes #4943.
Behdad Esfahbod e0c3cbf1 2024-08-06T06:46:44 [subset] Fail if source face has no glyphs Also return nullptr if any of the input pointers are nullptr. Before we were returning the empty face. Fixes https://github.com/harfbuzz/harfbuzz/issues/4824
Qunxin Liu cfbb6a68 2024-03-14T17:33:34 [subset] support BASE table subsetting (#4618) * [subset] support BASE table * [subset] add tests for BASE table subsetting
Qunxin Liu d550e16a 2023-11-06T10:31:05 [instancer] Recalc avgcharwidth after instancing
Qunxin Liu 6c017a11 2023-11-01T09:54:46 [instancer] SinglePos/PairPos: do not strip_hints for partial instancing
Qunxin Liu 5c6795e2 2023-09-21T12:04:03 [instancer] make GPOS depend on GDEF when partial instancing GPOS needs to wait for GDEF remapping layout var idxes
Thomas Petillon 284889b0 2023-09-20T20:17:48 [subset] Drop fvar, avar, cvar, MVAR tables when in HB_NO_VAR mode
Qunxin Liu 45c2d05d 2023-08-31T15:45:22 [instancer] add subset() for MVAR
Qunxin Liu 0065658e 2023-08-07T11:12:02 [instancer] enable cvar instancing code
Qunxin Liu 13f05ab9 2023-07-20T09:57:02 [instancer] support avar table partial instancing
Qunxin Liu a0bb2d3a 2023-07-19T11:21:01 [instancer] support STAT table for all instancing operations
Behdad Esfahbod db3aeeb5 2023-07-09T12:32:49 [subset] Fix cast-align issue Fixes https://github.com/harfbuzz/harfbuzz/issues/4316
Behdad Esfahbod e7ad017c 2023-06-25T22:25:24 [subset/cff] Allocate more memory for retain-gids To avoid serializing twice. 20% speedup in: BM_subset/subset_glyphs/SourceSansPro-Regular.otf/retaingids/10
Behdad Esfahbod 4332cb33 2023-06-23T12:03:42 [subset] Fix bot failure
Behdad Esfahbod 5f399139 2023-06-23T11:22:01 [subset/cff] Move lazy cff-accelerator to cff-subset-accelerator Fixes https://github.com/harfbuzz/harfbuzz/issues/4295
Behdad Esfahbod 7344411c 2023-06-23T10:27:44 [subset] Sprinkle some HB_NO_SUBSET_CFF
Behdad Esfahbod 43ec78f9 2023-06-23T10:22:30 [subset/cff] Cache CFF accelerator in hb_subset_plan_t This shows 7% speedup in: BM_subset/subset_glyphs/SourceHanSans-Regular_subset.otf/retaingids/10
Behdad Esfahbod 154aae3a 2023-06-22T20:41:16 [subset] Minor use an auto variable I need this later. :D
Behdad Esfahbod 590fb352 2023-06-03T19:21:22 [subset] Reduce memory pressure
Behdad Esfahbod c03c3000 2023-06-03T19:05:10 [subset] Tweak memory allocation Reduces chances of rework, specially for glyf table if padding is needed...
Behdad Esfahbod f014112d 2023-06-03T18:27:24 Revert "[subset] Allow adding table directly from subset()" This reverts commit 25a6514887ebe899bd4ede1e283e067f97e15def.
Behdad Esfahbod 25a65148 2023-06-03T18:26:36 [subset] Allow adding table directly from subset() And do it for hmtx. Going to revert since it slows things down. Apparently the serializer buffer is in caches and hot, so faster to write to and copy even.
Khaled Hosny b6516f3b 2023-05-08T15:31:24 [cff] Fix the case of HB_OT_TAG_cff(1|2) macros Should be upper case like other HB_OT_TAG_* macros of upper case tables.
Behdad Esfahbod 4129061e 2023-04-24T13:04:05 Revert "Move hb-ot-name-language-static.hh out of hb-static.cc" This reverts commit 7b5f0dd3a8b4a126b7952fea1c4c30b8b456083e. Fixes https://github.com/harfbuzz/harfbuzz/issues/4203
Qunxin Liu a975ec48 2023-02-14T13:26:59 [instancer] apply cvar deltas
Qunxin Liu 0de7f83a 2023-01-18T13:33:34 [instancer] update maxp table
Qunxin Liu 94c390d0 2023-01-18T10:15:47 [instancer] update head table
Behdad Esfahbod 7b5f0dd3 2023-01-12T15:05:19 Move hb-ot-name-language-static.hh out of hb-static.cc Since hb-static.cc is used by libharfbuzz-cairo as well.
Behdad Esfahbod 65d3db37 2023-01-11T12:36:54 [subset-plan] Simplify user_axes_location allocation
Behdad Esfahbod c51d3368 2023-01-11T11:22:22 [subset-plan] Simplify no_subset_tables allocation
Behdad Esfahbod 999be721 2023-01-11T11:21:17 [subset-plan] Simplify drop_tables allocation
Matthias Clasen 4adc748b 2023-01-01T09:46:11 Move Color tables to src/OT/Color/
Behdad Esfahbod 2c64048b 2022-12-31T13:26:00 [subset] Another exact-allocation
Garret Rieger 1840b02e 2022-12-19T20:06:32 [subset] Don't gate access to the table repacker. Any table with an object graph should repack correctly.
Garret Rieger b5acde43 2022-12-13T22:04:19 [subset] check pending/subsetted tag sets for alloc failure.
Garret Rieger 38a96288 2022-12-12T20:13:17 [subset] simplify handling of table subsetting depedencies. Allow the dependency checker to see all tables that will be subset. Use this to fix the HMTX/VMTX dep check against glyf. Don't delay hmtx/vmtx subsetting if no glyf table is present.
Garret Rieger 0853e5d9 2022-12-12T19:43:31 [subset] if table dependencies can't be resolved fail the subset. Avoids getting stuck in an infinite loop.
Garret Rieger 7a004a7a 2022-11-29T00:47:55 [subset] Cache per subtable cmap unicode mappings.
Garret Rieger 2c0afde7 2022-11-23T20:24:40 [subset] add an inprogress accelerator to plan. This allows subset code to cache information into the accelerator during preprocess subset. Previously the accelerator was created at the end of subsetting.
Behdad Esfahbod e0b06bd1 2022-11-21T16:09:39 [subset] Cache has_seac in accelerator Speeds up SourceHanSans-Regular/10000 benchmark by %25.
Behdad Esfahbod b0b7a653 2022-10-20T17:13:26 [subset] Fix check-symbols failure Fixes https://github.com/harfbuzz/harfbuzz/issues/3850
Garret Rieger 515863e5 2022-10-13T23:42:00 [subset] Remove add accelerator flag, replace with new api method. Adds hb_subset_preprocess() which preprocesses the face and attaches accelerator data.
Garret Rieger 01481db5 2022-10-13T21:12:22 [subset] use accelerator unicode to gid map if available.
Garret Rieger 4ec5eb95 2022-10-13T19:40:31 [subset] add a subset accelerator. Can be optionally attached to the face during subsetting. Contains data which can accelerate future subsets.
Qunxin Liu 0a6c16a3 2022-08-08T13:47:39 [instance] instantiate fvar table Added an old->new axes_indices mapping in the subset plan
Qunxin Liu ac0e22fa 2022-07-22T09:37:09 [instance] update glyf/hmtx/vmtx tables
Qunxin Liu df55f840 2022-06-30T09:36:19 [instance] instantiate STAT table when axes are pinned at fixed locations restricting ranges is not supported yet.
Qunxin Liu 2a4773e4 2022-06-21T19:29:52 add option "--instance", store axes_location in subset_plan and drop all variation tables when all axes are pinned at default
Behdad Esfahbod ac216972 2022-07-13T15:32:19 [subset] Add table size blowup bound Fixes https://github.com/harfbuzz/harfbuzz/issues/3091
Garret Rieger 29f149c1 2022-07-07T20:16:16 [subset] cache sanitized tables in subset plan to avoid sanitizing tables multiple times.
Garret Rieger 5fdae684 2022-06-29T23:52:08 [reorg] Move GSUB.hh up one level and change GSUB namespace to GSUB_impl.
Garret Rieger 3fbf2dec 2022-06-28T23:55:32 [reorg] Move OT::Layout::GPOS_impl::GPOS to OT::Layout::GPOS.
Garret Rieger 88ef3c5a 2022-06-28T23:26:49 [reorg] Change OT::Layout::GPOS to OT::Layout::GPOS_impl.
Garret Rieger 74f45f7c 2022-06-24T23:14:30 [reorg] Move remaining GPOS lookup types to new directory.
Behdad Esfahbod e9c0a740 2022-06-15T16:57:16 Fix clang -Wcomma warnings Fixes https://github.com/harfbuzz/harfbuzz/issues/3656
Garret Rieger e00c7358 2022-05-25T22:35:23 [subset] special case table presence check for hb_face_create_from_tables faces.
Garret Rieger 6a149a09 2022-05-25T22:22:35 [subset] fix use of lazy static constructor.
Garret Rieger d4c7939e 2022-05-25T22:11:32 [subset] use a list of known tables instead of handled tables.
Garret Rieger 3472f73b 2022-05-25T21:49:12 [subset] also include no subset tables when guessing which tables are present.
Garret Rieger 9564d987 2022-05-25T21:16:37 [subset] fix subsetting of faces created via hb_face_create_for_tables. Fixes #3609.
Behdad Esfahbod c78d8ba6 2022-05-11T13:05:41 [subset] Allocate same size as source table for GSUB/GPOS/name
Behdad Esfahbod 2e7f1ae4 2022-05-11T12:49:16 [subset] Use vector.allocated size instead of tracking buf_size
Behdad Esfahbod aeb50b89 2022-05-10T18:06:53 [subset] Retain buffer across table subset operations
Garret Rieger b342adeb 2022-03-23T16:28:22 [reorg] Move GSUB into OT::Layout::GSUB namespace.
Khaled Hosny 8d1b000a 2022-03-01T21:27:32 4.0.0
Garret Rieger fc1548cf 2022-02-17T17:16:31 [subset] document return values.
Garret Rieger 670ef070 2022-02-11T16:01:33 [subset] Change subset plan create to be or_fail.
Garret Rieger ae8d373b 2022-02-11T14:54:23 [subset] add subset plan reference, set/get user data functions.
Garret Rieger b65e48a7 2022-02-11T12:44:58 [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.
Garret Rieger fa966bcc 2021-12-06T12:54:19 [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.
Garret Rieger 41bbf281 2021-09-08T10:14:00 [repacker] do extension subtable isolation before starting resolution attempts.
Qunxin Liu ca7b9dae 2021-09-20T14:42:51 [subset] subset MATH table
Garret Rieger d700646c 2021-09-16T11:23:09 [subset] In preperation for 3.0.0 release remove legacy subsetting api methods.
Khaled Hosny 9aa6f8a9 2021-08-18T09:32:04 2.9.0
Garret Rieger d18aad7e 2021-08-13T15:05:48 [subset] restore old subsetting api methods. These will be left in place until the 3.0.0 release.
Garret Rieger 46d4a5e6 2021-07-29T15:07:13 [subset] Convert subset plan to use a flags bit set.
Garret Rieger fc7f7781 2021-07-27T12:21:19 [subset] add a note to hb-subset on what is and isn't supported (#3076)
Qunxin Liu 71b5509c 2021-07-20T20:05:35 [subset] support option --glyph-names
Garret Rieger 89fc399e 2021-07-22T13:00:34 [subset] Add hb-subset section documentation.
Garret Rieger 9ab751ac 2021-06-23T13:38:47 [subset] Remove hb_subset(). Leaving just hb_subset_or_fail().
Garret Rieger a6c6cda4 2021-06-09T17:46:47 [subset] Add no subset tables and passthrough unrecognized tables to the subset api. Matches fontTools options.
Garret Rieger 668f2bd9 2021-06-09T16:33:50 [subset] Add hb_subset_or_fail () to public subset api.
Garret Rieger edb57a8d 2021-06-09T10:42:48 Make subset input const in the subsetting operation. Don't modify the subset input's sets.
Qunxin Liu 7ab0f4ed 2021-05-27T11:40:34 fuzzer fix
Qunxin Liu f739e1dc 2021-05-11T11:44:32 [subset] subset both CPAL and COLRv1
Garret Rieger 3fb62cdc 2021-04-05T15:48:34 [subset] fail on offset overflow in tables that we don't repack. Fixes: https://oss-fuzz.com/testcase-detail/5229304507138048
Garret Rieger 3c8273ab 2021-03-25T11:39:57 Check for alloc failures on the gsub/gpos_langsys maps in subset plan creation.
Garret Rieger b14475d2 2021-03-18T10:51:26 [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.
Garret Rieger 73ed59f7 2021-03-17T15:53:10 [subset] store errors in the serializer as a flag set. Make check_assign/check_equal specify the type of error to set.
Garret Rieger 832f2b59 2020-11-10T16:15:37 [subset] Refactor _subset () to reduce nesting and eliminate the use of 'goto'.
Garret Rieger 6e9468fc 2020-11-09T16:52:36 [subset] cleanup memory leaks in the repacker.