Commit Graph

112 Commits

Author SHA1 Message Date
Garret Rieger 3844e58e14 [subset] remove helper functions for accessing subset input sets. 2021-08-30 11:16:51 -07:00
Garret Rieger 102666dab7 [subset] add test for hb_subset_input_set (...). 2021-08-27 10:36:42 -07:00
Garret Rieger 7194c2a2a3 [subset] use anonymous union to hold the input sets instead of a map. 2021-08-27 10:36:42 -07:00
Garret Rieger 05204d7586 [subset] implement hb_subset_input_set (...).
Switch to storing the sets keyed by enum internally.
2021-08-27 10:36:36 -07: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
Garret Rieger fb07f8f876 During subset input creation check for set alloc failures and fail if encountered. 2021-08-24 10:59:14 -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
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 f9d8e4a976 [subset] switch ..._set_flags to not take a mask. 2021-07-29 18:30:27 -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
Behdad Esfahbod 4762fcb415
Merge pull request #3067 from googlefonts/glyph_names
[subset] support option --glyph-names
2021-07-26 11:48:55 -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
Qunxin Liu 71b5509c19 [subset] support option --glyph-names 2021-07-23 13:57:39 -07:00
Garret Rieger 1fde80ad28 [subset] update comments referencing hb_subset_input_t parameter. 2021-07-22 16:45:48 -07:00
Garret Rieger 2b9cb29923 [subset] cleanup no_subset_tables on destruction. 2021-07-22 13:26:03 -07:00
Garret Rieger 792e2ed61c [subset] convert no get/set prune unicode ranges to enum. 2021-07-22 12:41: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 372722ceee [subset] move notdef_outline to the subset input property enum. 2021-07-22 12:14:03 -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 7d82191f61 [subset] Remove hb_subset_input_get/set_name_legacy (). 2021-07-22 12:12:36 -07:00
Garret Rieger 942636ae13 [subset] Remove hb_subset_input_get/set_retain_gids. 2021-07-22 12:12:36 -07:00
Garret Rieger 77b4a1cd96 [subset] Remove hb_subset_input_get/set_desubroutinize. 2021-07-22 12:12:36 -07:00
Garret Rieger 8bf5d4d4f7 [subset] Remove hb_subset_input_get/set_drop_hints. 2021-07-22 12:12:36 -07:00
Garret Rieger 38de3491a0 [subset] add implementation for get/set flag on subset input. 2021-07-22 12:12:36 -07:00
Garret Rieger 83727837ef [subset] add proposed enum property get/set method. 2021-07-22 12:12:36 -07:00
Garret Rieger b38e49dcfa [subset] add get/set user data methods to subset input. 2021-07-22 12:12:30 -07:00
Behdad Esfahbod 2337f0d047 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
2021-07-08 10:54:09 -07:00
Qunxin Liu eee7b459ee [subset] add option --no-prune-unicode-ranges 2021-06-24 11:44:20 -07:00
Qunxin Liu d07f789ae3 [subset] support option "--notdef-outline" 2021-06-18 15:35:02 -07:00
Garret Rieger 18f61210a4 Add public api methods to get/set the layout features to retain. 2021-06-02 15:18:45 -06:00
Qunxin Liu cb5a6b5a27 [subset] support option --layout-features 2021-05-26 18:04:18 -06:00
Garret Rieger 73ff04a324 [subset] add option to have the subsetter set the mac overlaps flag on each glyph. 2021-05-26 16:04:56 -06:00
Garret Rieger 6fddc2bbf9 [subset] subset layout tables (G*) by default. 2021-04-22 15:08:49 -07:00
Qunxin Liu 36a5c042d7 [subset] Add "--name-languages" and "--name-legacy" options
Make name table subsetting consistent with fontTools
2020-01-24 23:17:04 +03:30
Ebrahim Byagowi e171beeb5f Revert "[subset] Add "--name-languages" and "--name-legacy" options"
Causes tests failures, please reapply when tests are fixed, thanks.

This reverts commit fd85818b5b.
2020-01-24 19:51:32 +03:30
Qunxin Liu fd85818b5b [subset] Add "--name-languages" and "--name-legacy" options
Make name table subsetting consistent with fontTools
2020-01-23 17:24:05 -08:00
ckitagawa 93376a6436 Add unittests 2020-01-15 13:36:01 -08:00
Ebrahim Byagowi a0b4ac4dce Turn 8 spaces to tab across the project
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Garret Rieger ff7fc6d488 [subset] Add morx, mort, kern, and kernx to the default layout tables drop list. 2019-05-22 17:36:16 -07:00
Qunxin Liu 993d81b9c5 [subset] Add one ttf file with fvar/STAT tables to integration test
Ignore gvar/MVAR/HVAR table
add support for --nameIDs=* option
2019-05-22 17:20:45 -07:00
Garret Rieger 0ff3618c2d [subset] Use hb_subset_input_t inside of subset_options_t so that input defaults are shared between the library and cli. 2019-05-20 13:35:46 -07:00
Garret Rieger 3be0ffe45d [subset] Add drop tables to subset input. 2019-05-20 13:35:46 -07:00
Qunxin Liu e501ea143d [subset] Subset name table step 3, add --nameids option to guide the
selection of which name records to keep in the subset method.
2019-04-26 15:24:47 -07:00
Behdad Esfahbod 59f36f3682 Replace REPLACEME's left out of 2.4.0
https://github.com/harfbuzz/harfbuzz/issues/1641
2019-03-29 10:55:12 -07:00
Garret Rieger b7f971884e Add retain_gids option to subset input. Update glyf and loca handling to respect retain_gids. 2019-01-29 13:19:21 -08:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Michiharu Ariza b403be8ad9 Merge branch 'master' into cff-subset 2018-11-16 12:29:18 -08:00
Ebrahim Byagowi 11aa0468ac [subset] minor, adjust spaces 2018-11-16 00:02:47 +03:30
Michiharu Ariza 6186dbf1be added hb_subset_input_set_desubroutinize API
hooked up with CFF1 subroutinizer
a renaming
2018-11-01 17:25:23 -07:00
Behdad Esfahbod 93fe0faaee [subset] Clean up hb_subset_input_t API 2018-08-29 18:24:03 -07:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00
Behdad Esfahbod be458eb059 Include more basic internal headers from hb-private.hh 2018-07-10 14:41:04 +02:00
Garret Rieger 46f7e7760f [subset] Use REPLACEME instead of version. 2018-06-08 12:09:34 -06:00
Garret Rieger a5673da9be [subset] Add drop_ot_layout setting to subset input. 2018-06-08 12:09:34 -06:00
Rod Sheeter 2e3ee489f8 [subset] format tweak, doc string 2018-02-23 18:18:54 -08:00
Rod Sheeter 4f07437dfe [subset] sketch out dropping in-glyf instructions. Sometimes yields differnet size glyphs than fonttools, possibly due to padding not being corrected 2018-02-21 22:23:05 -08:00
Behdad Esfahbod 9046e92442 [subset] Rename constructor to hb_subset_input_create_or_fail()
To signify that unlike rest of library, returns nullptr on failure.
2018-02-13 22:07:12 -08:00
Behdad Esfahbod d5b33f2fe1 [subset] hb_subset_input_t changes 2018-02-13 13:55:10 -08:00