src/hb-subset-plan.cc


Log

Author Commit Date CI Message
Behdad Esfahbod aa7f5e37 2022-12-04T15:31:47 [subset] Conditionalize call to hb_font_set_variations
Behdad Esfahbod 2cdaedaf 2022-12-03T10:16:35 Use hb_enumerate in more places
Qunxin Liu 8eadb836 2022-11-10T10:33:26 [subset] Update hb_subset_input_override_name_table API Override the name string for the NameRecord identified by name_id, platform_id, encoding_id and language_ids specified by the user. If a record with specified name_id does not exist, this API will create a new NameRecord with provided info and insert it to the name table.
Behdad Esfahbod ff419789 2022-12-02T16:25:26 [subset-plan] Sort unicode_to_new_gid_list when needed
Behdad Esfahbod 1a40da4a 2022-12-02T16:13:37 [subset-plan] Use add_array instead of add_sorted_array That vector is not declared as sorted.
Behdad Esfahbod 32e049a3 2022-12-02T16:09:10 [subset-plan] Use gid-to-unicodes multimap One test fails. Need investigation.
Behdad Esfahbod 7d6893a8 2022-12-02T15:50:52 [subset-accelerator] Cache gid-to-unicodes
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.
Garret Rieger 463ae07e 2022-11-23T18:41:23 [subset] In the preprocess subset call always use long loca. Long loca is needed so that we can store the trimmed glyph bytes to allow us to safely skip trimming in the later subset.
Behdad Esfahbod e0b06bd1 2022-11-21T16:09:39 [subset] Cache has_seac in accelerator Speeds up SourceHanSans-Regular/10000 benchmark by %25.
Behdad Esfahbod f6076890 2022-11-14T16:06:39 Hide all mentions of name_table_overrides behind EXPERIMENTAL_API Fixes https://github.com/harfbuzz/harfbuzz/issues/3872
Behdad Esfahbod ebc382a8 2022-11-14T15:59:46 Revert "Avoid use values () in hb-hashmap if value_t has an overriden operator &" This reverts commit b92e4cc0091e093f6941019e1a53cc04a137017a.
Qunxin Liu b92e4cc0 2022-11-14T08:54:24 Avoid use values () in hb-hashmap if value_t has an overriden operator &
Behdad Esfahbod 630f09c8 2022-11-09T11:32:30 Another hb_memcpy instead of strncpy use
Qunxin Liu 6314aa7d 2022-10-28T10:44:48 [subset] add an experimental API that can override name strings for specified name_id
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.
Qunxin Liu f4813e3b 2022-09-09T10:34:09 [instance] update collect_lookups/prune_features()/closure_features() with variations Some features will be substituted with variations, so we do not collect lookups from the original feature tables.
Qunxin Liu 64e2f2fc 2022-09-09T09:36:19 [instance] store active featurevariation record/condition idxes in the plan
Qunxin Liu 0a6c16a3 2022-08-08T13:47:39 [instance] instantiate fvar table Added an old->new axes_indices mapping in the subset plan
Khaled Hosny d827a5ee 2022-09-19T10:40:49 [subset] Skip glyph closure for any dropped table If COLR or MATH tables are being dropped, there is no point in closing glyphs over them, just like it is done for GSUB.
Qunxin Liu 2b766e8a 2022-09-02T11:34:31 [subset] No need to collect_features twice
Qunxin Liu a3e6dbbb 2022-09-02T13:53:10 [subset] skip the script if it's not included in the final subset
Qunxin Liu 7d7b4923 2022-08-24T11:49:50 [instance] move _normalize_axes_location to the beginning of subset_plan_create pinned_at_default flag decides whether delta will be collected as well when collecting layout variation indices
Qunxin Liu b72995ff 2022-08-01T14:48:01 [instance] GDEF table: collect both varidxes and deltas
Qunxin Liu e03043bd 2022-08-01T11:37:47 [subset] don't let VariationStore subset() produce inner_maps Make it a subset-planning object so VariationStore can subset to specified inner_maps. Also add a layout_variation_idx_delta_map in subset_plan
Qunxin Liu ac0e22fa 2022-07-22T09:37:09 [instance] update glyf/hmtx/vmtx tables
Garret Rieger 37d61afd 2022-08-18T21:05:48 [subset] add destructor to subset plan. This ensures that it's members get destructed before the plan itself is destructed, as hb_object_destroy calls the destructor for plan.
Qunxin Liu 0f800769 2022-07-20T14:59:02 [subset] Do not repeat COLR table closure
Behdad Esfahbod e1b5f2f8 2022-07-20T15:03:20 [object] Call destructor in hb_object_destroy()
Qunxin Liu 712bfa88 2022-07-19T13:57:14 build fix for HB_NO_VAR
Qunxin Liu be8e8e8c 2022-06-30T14:24:36 [instance] prune name tables after axes pinned at fixed locations Restricting axes to ranges is not supported yet.
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 09de9478 2022-07-11T15:08:22 [>64k:glyf] Hid composite glyphIndex
Behdad Esfahbod 04c5cd40 2022-07-11T11:39:41 [subset/layout] Move find_duplicate_features to subset from layout
Garret Rieger 29f149c1 2022-07-07T20:16:16 [subset] cache sanitized tables in subset plan to avoid sanitizing tables multiple times.
Behdad Esfahbod 386e1bba 2022-07-05T12:46:05 Merge pull request #3699 from googlefonts/filter_scripts [subset] Add support for --layout-scripts
Garret Rieger 30309ec8 2022-07-05T18:33:19 [subset] add null element in _filter_tag_list.
Garret Rieger 216cf594 2022-07-05T17:49:12 [subset] Allocate space for null entry in script/feature list.
Garret Rieger dbfd2bf3 2022-06-30T23:04:35 minor.
Garret Rieger 5fdae684 2022-06-29T23:52:08 [reorg] Move GSUB.hh up one level and change GSUB namespace to GSUB_impl.
Garret Rieger 70e32a66 2022-06-30T21:00:48 [subset] Add layout_scripts to subset input.
Garret Rieger 41d2c335 2022-06-30T20:24:42 [subset] Apply script list filter when doing layout collection.
Garret Rieger e5c8a2f4 2022-06-30T20:14:29 [subset] Pass plan through to collect methods. Allows to more easily access the filtering sets as they are added and enables propagating errors to the plan.
Garret Rieger 1bf051ef 2022-06-30T20:03:33 [subset] refactor feature tag filtering so it can be used for scripts as well.
Khaled Hosny 98e90cc6 2022-06-30T08:43:57 [docs] Reduce warnings Use markdown syntax for inline code blocks instead of %true, %false, and %NULL.
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 db039d97 2022-06-25T19:06:27 [glyf/Composite] Make glyphIndex public
Behdad Esfahbod b4a0c30d 2022-06-25T17:01:11 [glyf] Remove hardcoded HB_MAX_COMPOSITE_OPERATIONS
Behdad Esfahbod 36373ee1 2022-06-25T16:54:46 [glyf] Move add_gid_and_children to subset-plan where it belongs
Behdad Esfahbod 100576b7 2022-06-25T14:38:43 [glyf] Start splitting file
Behdad Esfahbod f13a7954 2022-06-03T01:17:20 [subset] Convert another use of hashmap to unique_ptr
Garret Rieger adae2f22 2022-05-18T21:42:28 [subset-perf] Cache a glyph map for gsub. This allows us in some cases to avoid using glyph_set_gsub as a filter.
Behdad Esfahbod ce604621 2022-05-18T12:34:27 [subset-plan] Pre-size maps in _create_old_gid_to_new_gid_map()
Behdad Esfahbod 8bfeea48 2022-05-05T10:48:24 [subset] Compute set max using previous()
Behdad Esfahbod 00cb8c62 2022-05-05T10:33:50 [subset] Don't go into glyf table if it's empty
Behdad Esfahbod 4fe69bc4 2022-05-05T10:19:16 [subset] Use del_range in _remove_invalid_gids
Behdad Esfahbod 2a42edcc 2022-05-04T17:06:18 [subset] Cosmetic; use set bulk array population instead of for loop
Behdad Esfahbod 43938ecd 2022-05-04T16:59:28 [subset] Remove outdated comment I tried something like that. It was slower because of the allocations.
Behdad Esfahbod 50db78ba 2022-05-04T15:48:18 [subset] In cmap planning, remove a qsort()
Garret Rieger 7cb36e42 2022-05-04T21:22:26 [subset] Re-introduce size threshold in choosing unicode collection method. Threshold is needed since the unicodes set might be an inverted set.
Garret Rieger 42c54eba 2022-05-04T20:21:43 [subset] Presize unicode to gid list to unicodes + glyphs size.
Garret Rieger 7c7c01d2 2022-05-03T22:40:56 [subset] Remove switch to alternate unicode collection at large subset sizes. Benchmarks show that the first path is always faster even at large subset sizes: BM_subset_codepoints/subset_roboto/10_median +0.0324 +0.0325 0 0 0 0 BM_subset_codepoints/subset_roboto/64_median +0.0253 +0.0255 0 1 0 1 BM_subset_codepoints/subset_roboto/512_median +0.0126 +0.0128 1 1 1 1 BM_subset_codepoints/subset_roboto/4000_median +0.0500 +0.0491 6 7 6 7 BM_subset_codepoints/subset_amiri/10_median +0.0338 +0.0332 1 1 1 1 BM_subset_codepoints/subset_amiri/64_median +0.0238 +0.0234 1 1 1 1 BM_subset_codepoints/subset_amiri/512_median +0.0066 +0.0063 8 8 8 8 BM_subset_codepoints/subset_amiri/4000_median -0.0011 -0.0012 13 13 13 13 BM_subset_codepoints/subset_noto_nastaliq_urdu/10_median +0.0226 +0.0226 0 0 0 0 BM_subset_codepoints/subset_noto_nastaliq_urdu/64_median +0.0047 +0.0044 20 20 20 20 BM_subset_codepoints/subset_noto_nastaliq_urdu/512_median +0.0022 +0.0021 165 166 165 166 BM_subset_codepoints/subset_noto_nastaliq_urdu/1000_median -0.0021 -0.0023 166 166 166 165 BM_subset_codepoints/subset_noto_devangari/10_median +0.0054 +0.0054 0 0 0 0 BM_subset_codepoints/subset_noto_devangari/64_median +0.0024 +0.0019 0 0 0 0 BM_subset_codepoints/subset_noto_devangari/512_median +0.0089 +0.0090 5 5 5 5 BM_subset_codepoints/subset_noto_devangari/1000_median -0.0028 -0.0019 5 5 5 5 BM_subset_codepoints/subset_mplus1p/10_median +0.0001 +0.0002 0 0 0 0 BM_subset_codepoints/subset_mplus1p/64_median +0.0073 +0.0075 1 1 1 1 BM_subset_codepoints/subset_mplus1p/512_median +0.0034 +0.0034 1 1 1 1 BM_subset_codepoints/subset_mplus1p/4096_median -0.1248 -0.1248 7 6 7 6 BM_subset_codepoints/subset_mplus1p/10000_median -0.0885 -0.0885 13 12 13 12 BM_subset_codepoints/subset_notocjk/10_median +0.0031 +0.0032 2 2 2 2 BM_subset_codepoints/subset_notocjk/64_median -0.0010 -0.0010 2 2 2 2 BM_subset_codepoints/subset_notocjk/512_median -0.0023 -0.0023 9 9 9 9 BM_subset_codepoints/subset_notocjk/4096_median -0.1725 -0.1726 28 23 28 23 BM_subset_codepoints/subset_notocjk/32768_median -0.0277 -0.0287 140 137 140 136 BM_subset_codepoints/subset_notocjk/100000_median -0.0929 -0.0926 162 147 162 147
Garret Rieger f0c04114 2022-05-03T22:02:59 [subset] Embed unicode to gid list vector in subset plan.
Garret Rieger 85ec5cbc 2022-05-02T22:29:43 [subset] In _populate_unicodes_to_retain populate unicodes in order. Allows the set insert to take advantage of page lookup cache.
Garret Rieger 088133d9 2022-05-02T21:29:16 [subset] cache cp to new gid list in subset plan. This avoids having to recompute the ordered list multiple times during cmap generation.
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
Khaled Hosny 6e466256 2022-03-01T12:01:18 [doc] Typo
Garret Rieger f6071c16 2022-02-28T14:45:40 [subset] Rename codepoint -> unicode in subset plan api
Khaled Hosny 1b5a2e08 2022-02-25T04:22:33 [doc] Various fixes to newly added documentation
Garret Rieger fc1548cf 2022-02-17T17:16:31 [subset] document return values.
Garret Rieger 27a6c895 2022-02-11T16:19:43 [subset] Fix memory leak in plan creation.
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.
Behdad Esfahbod ae9fc7f5 2022-01-20T12:37:21 Clean accelerators a bit more
Behdad Esfahbod ac1bb3e3 2022-01-20T11:47:17 [machinery] Move accelerators to constructor/destructor
Behdad Esfahbod e062376e 2022-01-19T17:09:34 [machinery] Make accelerator lazy-loader call Xinit/Xfini Instead of init/fini. To isolate those functions. To be turned into constructor/destructors, ideally one per commit (after some SFINAE foo.)
Qunxin Liu 51655a07 2021-12-05T19:27:57 [subset] COLR : only include glyphs after COLR closure
Qunxin Liu 903a6bae 2021-11-15T19:58:33 [subset] layout_features filtering fix we should not use get_size (), which returns length * item_size
Behdad Esfahbod 394f7729 2021-11-19T11:49:23 [map] Allow storing classes in the hashmap Fixes https://github.com/harfbuzz/harfbuzz/issues/3293 The trick was to change the type of the invalid key/value to be non-class.
Qunxin Liu 8c583db9 2021-10-02T20:32:30 [subset] COLRv1: update subset() method for new strutc ClipList and VarIdxMap Also fix issues in struct PaintTransform definition
Qunxin Liu ca7b9dae 2021-09-20T14:42:51 [subset] subset MATH table
Garret Rieger 3844e58e 2021-08-30T11:16:51 [subset] remove helper functions for accessing subset input sets.
Garret Rieger 05204d75 2021-08-25T16:51:26 [subset] implement hb_subset_input_set (...). Switch to storing the sets keyed by enum internally.
Behdad Esfahbod 1620698b 2021-08-25T16:25:08 [subset-input] Minor format
Garret Rieger cd07070e 2021-08-25T14:42:00 [subset] Move plan unicodes and gids population to end of _populate_unicodes...
Garret Rieger 8f4f47df 2021-08-25T13:34:05 [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.
Behdad Esfahbod e9e6d66c 2021-08-24T23:22:49 [subset] Minor internal parameter rename
Garret Rieger 59deb754 2021-08-24T17:06:14 [subset] rename _collect_subset_layout to _collect_layout_indices. Better describes what the function does.
Garret Rieger f2441a4b 2021-08-24T15:53:32 [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.
Garret Rieger 46d4a5e6 2021-07-29T15:07:13 [subset] Convert subset plan to use a flags bit set.
Garret Rieger 3d534b14 2021-07-29T11:52:14 [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.
Behdad Esfahbod 4762fcb4 2021-07-26T11:48:55 Merge pull request #3067 from googlefonts/glyph_names [subset] support option --glyph-names
Khaled Hosny acc7100a 2021-07-26T02:13:49 [docs] Improve subset documentation
Qunxin Liu 71b5509c 2021-07-20T20:05:35 [subset] support option --glyph-names