src/hb-subset-plan.cc


Log

Author Commit Date CI Message
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
Garret Rieger 2b9cb299 2021-07-22T13:26:03 [subset] cleanup no_subset_tables on destruction.
Garret Rieger 1b6c1aa6 2021-06-28T12:57:39 [subset] add hb-subset api to documentation generator. Standardize subset_input parameter to be input.
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 8bf5d4d4 2021-06-09T14:05:17 [subset] Remove hb_subset_input_get/set_drop_hints.
Garret Rieger 9fb3a256 2021-06-09T13:46:35 [subset] Use hb_set_copy in subset input.
Garret Rieger edb57a8d 2021-06-09T10:42:48 Make subset input const in the subsetting operation. Don't modify the subset input's sets.
Garret Rieger 9aa0ecef 2021-07-14T17:27:14 [subset] de-duplicate the logic that finds unicodes corresponding to requested glyphs. Move the logic into subset planning and then re-use the results in cmap and OS2 subsetting. Removes depedency on cmap from os2.
Behdad Esfahbod 2337f0d0 2021-07-08T10:58:50 Internally use hb_malloc/.../hb_free instead of malloc/.../free Redefining those stock names as macros was conflicting with gcc 10 headers. Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
Qunxin Liu eee7b459 2021-06-24T10:17:46 [subset] add option --no-prune-unicode-ranges
Garret Rieger 26c80adb 2021-06-18T14:14:20 [subset] do colrv1 glyph closure before glyf composite closure.
Qunxin Liu d07f789a 2021-06-09T15:36:40 [subset] support option "--notdef-outline"
Behdad Esfahbod bc33b87f 2021-06-09T11:51:32 [set] Use references, not pointers, in internal C++ API
Qunxin Liu cb5a6b5a 2021-05-19T17:33:46 [subset] support option --layout-features
Garret Rieger 73ff04a3 2021-05-18T16:54:01 [subset] add option to have the subsetter set the mac overlaps flag on each glyph.
Qunxin Liu f739e1dc 2021-05-11T11:44:32 [subset] subset both CPAL and COLRv1
Dominik Röttsches 1dffb553 2021-05-18T12:31:14 Chromium build fixes for C++ 17 warning and missing _remap_indexes Use class instead of typename, move _remap_indexes out of #ifndef. Fixes #2979
Qunxin Liu e59ffe54 2021-04-01T12:01:19 [subset] COLRv1 layer/palette indices closure
Garret Rieger a08900b7 2021-05-04T16:48:41 [subset] fix failing colrv0 subsetting when font has composite glyphs. Composite glyph collection was happening along side colrv0 glyph collection which meant it was possible to miss grabbing the component glyphs for a glyph added by colrv0.
Garret Rieger 3c8273ab 2021-03-25T11:39:57 Check for alloc failures on the gsub/gpos_langsys maps in subset plan creation.
Qunxin Liu 56ca4357 2021-01-28T15:21:26 [subset] fix for collect_features and remove_redundant_lamngsys previously remove_redundant_sys () is missing in harfbuzz, after redundant langsys removal, some features are removed as well in prune_features() in fonttools. This change is trying to get the same result between harfbuzz and fonttools.
Garret Rieger aace09a3 2020-10-06T10:26:17 [subset] Use glyphset gsub for layout variation indices collection.
Garret Rieger 718bf5aa 2020-09-29T13:16:01 [subset] only keep features reachable from script in the final subset. Matches fontTools behaviour.
Ebrahim Byagowi 58a5961c 2020-07-29T08:44:23 minor spacing tweak
Ebrahim Byagowi 07c43b8c 2020-07-29T08:42:52 minor spacing tweak
Ebrahim Byagowi 5a7cc7fd 2020-07-29T08:33:32 minor spacing tweak
Garret Rieger dae32b4f 2020-07-28T18:31:46 [subset] bail out of subsetting if plan allocation fails.
Qunxin Liu 973c47f6 2020-06-11T11:27:57 [subset] Move 2 experimental public api methods to be private methods in GSUB/GPOS. 2 methods are: hb_ot_layout_closure_lookups and hb_ot_layout_closure_features
Ebrahim Byagowi 22037499 2019-08-04T11:31:31 [style] New experimental API, hb_style_get_value Searches variation axes of a hb_font_t object for a specific axis first, if not set, then tries to get default style values from different tables of the font.
Qunxin Liu d7c012a0 2020-02-26T13:11:42 [subset] GDEF Variation Store: step 2 do subset based on variation indices collected in step 1
Qunxin Liu 8200e48f 2020-02-26T13:11:42 [subset] GDEF Variation Store: step 1 closure device variation indexes, create old->new variation idx mapping and store them in subset-plan
Qunxin Liu b2a965df 2020-04-22T15:58:41 [subset] Add support for "--gids" option cmap subsetting now retains entries associated with any glyph ids explicitly requested
Ebrahim Byagowi 29c90322 2020-04-17T22:11:40 Move hb_ot_layout_closure_{features,lookups} behind EXPERIMENTAL flag
ckitagawa 7d542a52 2020-01-29T10:20:00 Refactor to two iterators
ckitagawa ed857c46 2020-01-24T08:52:23 [subset] Add COLR support
Qunxin Liu 36a5c042 2020-01-21T13:37:28 [subset] Add "--name-languages" and "--name-legacy" options Make name table subsetting consistent with fontTools
Ebrahim Byagowi e171beeb 2020-01-24T19:51:21 Revert "[subset] Add "--name-languages" and "--name-legacy" options" Causes tests failures, please reapply when tests are fixed, thanks. This reverts commit fd85818b5b85fb0ad2db71c60e94ca0689d38bca.
Qunxin Liu fd85818b 2020-01-21T13:37:28 [subset] Add "--name-languages" and "--name-legacy" options Make name table subsetting consistent with fontTools
Qunxin Liu 8ffc9add 2019-10-31T15:59:02 [subset] layout closure_features and store them in subset-plan
Qunxin Liu 0b39c480 2019-10-22T16:00:43 [subset] closure lookups for GSUB/GPOS
blueshade7 ab525ac6 2019-11-19T20:36:56 fix HB_TINY buid
Behdad Esfahbod 7152ac3f 2019-10-28T17:12:55 Fix build $ make CPPFLAGS="-DHB_TINY -DHB_NO_OT_FONT" libharfbuzz-subset.la
Ebrahim Byagowi be0eddd4 2019-10-08T13:46:55 [glyf] Move add_gid_and_children to glyf table
Ebrahim Byagowi c7621cf2 2019-10-08T13:24:26 Minor, replace hb_set_add with private API
Ebrahim Byagowi ad86806d 2019-10-08T12:14:14 [glyf] Move subset related methods inside GlyphHeader
Ebrahim Byagowi ee3f4630 2019-10-06T13:56:35 [glyf] Remove get_composite_iter and refactor bytes_for_glyph for shape uses
Ebrahim Byagowi 8378ab96 2019-10-06T13:49:45 [glyf] Rewrite composite iterator to new iterators convention
Ebrahim Byagowi ead46eef 2019-09-21T14:25:11 minor, use internal API instead public hb_set_has
Ebrahim Byagowi d8af4e77 2019-09-21T14:19:14 [cmap] minor, turn 8 spaces to tab
Qunxin Liu 078ddbd0 2019-08-07T13:17:26 [subset] glyph closure for CMAP14
Ebrahim Byagowi a0b4ac4d 2019-08-24T17:57:14 Turn 8 spaces to tab across the project According to the current code style of the project
Behdad Esfahbod 6157bbe5 2019-07-17T11:20:08 Revert "Revert previous change" This reverts commit b8e90ca1a10fbd472eda1aa8cc3797011da52356. Works now.
Ebrahim Byagowi b8e90ca1 2019-07-17T21:38:19 Revert previous change Interestingly all of the bots disagreed with the change and the complain is... weird.
Ebrahim Byagowi ee05627a 2019-07-17T21:28:25 Improve syntax to make out linux-arm64 a little happy Decided to apply is we did the same on other places however this won't fix all of its complains
Behdad Esfahbod a8498731 2019-06-19T19:26:22 [config] Add HB_NO_VAR to disable variations support, enabled by HB_TINY Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Behdad Esfahbod b0debc32 2019-06-19T18:42:39 [subset] Simplify collect_name_ids
Behdad Esfahbod a5897463 2019-06-19T18:36:35 [config] Add HB_NO_STAT Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Qunxin Liu 993d81b9 2019-05-14T13:55:11 [subset] Add one ttf file with fvar/STAT tables to integration test Ignore gvar/MVAR/HVAR table add support for --nameIDs=* option