Commit Graph

80 Commits

Author SHA1 Message Date
Behdad Esfahbod ccc2a1921a [util/hb-subset] Whitespace 2021-08-12 13:00:28 -06:00
Behdad Esfahbod 4dfc668e0a [util/hb-subset] Move glyph name parsing inline instead of post_parse
Now that we have face around we can just do it as it happens.
2021-08-12 13:00:28 -06:00
Behdad Esfahbod 08d43d1ba1 [util/hb-subset] Move add_all_unicodes inline, instead of post_parse
Now that we have the font loaded, we can do it as it happens.
2021-08-12 13:00:28 -06:00
Behdad Esfahbod 11b0b68853 [util/hb-subset] Pre-parse font-face so we can use it during main parsing 2021-08-12 13:00:28 -06:00
Behdad Esfahbod c45d2a9c9d [util] Allow setting cli summary / description 2021-08-12 11:19:59 -06:00
Behdad Esfahbod 1cb621d35d [util/hb-subset] Minor move parsing 2021-08-12 10:58:19 -06:00
Behdad Esfahbod 4d73b3d9b1 [util] Add --batch to hb-view / hb-ot-shape-closure 2021-08-12 10:39:46 -06:00
Behdad Esfahbod 23282c9c9d [util/hb-subset] Support ranges in --unicodes / --unicodes-file
Fixes https://github.com/harfbuzz/harfbuzz/issues/3109
2021-08-11 22:49:47 -06:00
Behdad Esfahbod f60f005b1f [util/hb-subset] Remove wrong hb_set_destroy() in error paths 2021-08-11 22:36:00 -06:00
Behdad Esfahbod 49cf36027c [util/hb-subset] Parse --gids-file, --glyphs-file, --text-file, --unicodes-file
Fixes https://github.com/harfbuzz/harfbuzz/issues/2455
Fixes https://github.com/harfbuzz/harfbuzz/issues/3002
2021-08-11 22:34:14 -06:00
Behdad Esfahbod bf80b7ea45 [util/hb-subset] Add --glyphs for passing glyph names
Part of https://github.com/harfbuzz/harfbuzz/issues/2455
2021-08-11 22:07:45 -06:00
Behdad Esfahbod 5b07c3c7d0 [util/hb-subset] Parse --text & --unicodes 2021-08-11 21:32:28 -06:00
Behdad Esfahbod c98773ebb0 [util/hb-subset] Move output-file validation code into post_parse 2021-08-11 20:22:03 -06:00
Behdad Esfahbod 58bfe40794 [util] Move hb-subset away from main-font-text 2021-08-11 20:12:36 -06:00
Behdad Esfahbod 97a9e4e41e [util] Separate shape_text_options_t from text_options_t 2021-08-11 19:28:16 -06:00
Behdad Esfahbod e4b33d9d36 [util] Use post_parse in face_options_t 2021-08-11 18:49:58 -06:00
Behdad Esfahbod 9468e46998 [util] Rename main_font_text back to main_font_text_t 2021-08-11 16:46:04 -06:00
Behdad Esfahbod 9d8bbe3e53 [util] Make main_font_text a struct again
Going to move to G_OPTION_REMAINING.
2021-08-11 11:53:32 -06:00
Behdad Esfahbod 5bd463f130 [util/hb-subset] Access input directly 2021-08-10 14:26:48 -06:00
Behdad Esfahbod b83fd3a564 [util] Refactor batch-processing code into batch.hh 2021-08-10 02:32:55 -06:00
Behdad Esfahbod d92ee726ce [util/hb-shape] Treat as single-paragraph text other than provided by a file
Fixes https://github.com/harfbuzz/harfbuzz/issues/3129
2021-08-09 19:16:13 -06:00
Behdad Esfahbod 7d2e9164ab [util] Move text options into text_options_t
Remove now empty options.cc.
2021-08-07 13:38:19 -06:00
Behdad Esfahbod 93bc62e9b2 [util] Move output options into output-options.hh 2021-08-07 13:13:58 -06:00
Behdad Esfahbod af9d2495dc [util] Use inheritance for output_options_t 2021-08-07 13:09:56 -06:00
Behdad Esfahbod 5545eea7e5 [util] Remove main_font_text_t class, use bare function 2021-08-07 11:04:46 -06:00
Behdad Esfahbod 58c223357b [util] Move face/font options into face/font-options.hh 2021-08-06 23:47:48 -06:00
Behdad Esfahbod 798bb89c96 [util] Move shape format options into shape-format.hh 2021-08-06 23:30:55 -06:00
Behdad Esfahbod 167f58a2ca [util] Move subset options into subset-options.hh 2021-08-06 23:10:49 -06:00
Behdad Esfahbod 4e97678ebb [util] Use inheritence to embed inherent options of objects 2021-08-06 22:53:44 -06:00
Behdad Esfahbod 6500f68f1f [util] Change hb-subset to use face_options_t instead of font_options_t 2021-08-06 19:17:12 -06:00
Behdad Esfahbod 71440dbd90 [util] Move font-size and upem to be extern variables 2021-08-06 19:17:12 -06:00
Behdad Esfahbod fc0339eef0 [util] Simplify shape-consumer by removing buffer arg 2021-08-06 19:17:12 -06:00
Behdad Esfahbod e014c6fa2d [util/main-font-text] Move eol from template arg to main() arg 2021-08-06 19:17:12 -06:00
Behdad Esfahbod e109f9a6f9 [util] Collect cmdline arg options outside of constructor 2021-08-06 19:17:12 -06:00
Behdad Esfahbod e57dd66889 [util] Initialize struct members inline 2021-08-06 19:17:12 -06:00
Behdad Esfahbod 21f1054d47 [util/hb-subset] Keep face around instead of font 2021-08-06 19:17:12 -06:00
Behdad Esfahbod db6fbe29e4 [util/hb-subset] Use driver_t<> in outer block as well
a363ce573c (r54282223)
2021-08-04 10:25:03 -06:00
Behdad Esfahbod 47d47e8c43 [util/hb-shape/hb-subset] Don't terminate on first error in batch mode
There's no reason to quit processing.  The failure is already
communicated via stdout in both cases.
2021-08-01 22:12:08 -06:00
Behdad Esfahbod a363ce573c [util/hb-subset] Minor refactor of batch mode
To match recent changes to hb-shape.
2021-08-01 22:11:13 -06:00
Khaled Hosny 10e73d188a [test] Add batch mode to hb-subset and use it
time meson test --suite=subset down from:
real	0m22.822s
user	0m44.561s
sys	0m9.255s

to:
real	0m19.418s
user	0m38.171s
sys	0m3.587s

Does not seem to help much, but it is something.

Part of https://github.com/harfbuzz/harfbuzz/issues/3089
2021-08-01 22:08:28 -06: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
Garret Rieger 668f2bd93e [subset] Add hb_subset_or_fail () to public subset api. 2021-07-22 12:12:36 -07:00
Garret Rieger 1bb00cd54b [subset] add num-iterations flag to util/hb-subset. 2021-05-26 15:20:44 -06:00
Khaled Hosny 97a093c52f [hb-subset] Improve error handling a bit
* Check that output-file option is actually set before trying to open
  it.
* Print file name and errno when opening the output file fails.
* Be more resilient when writing output file and use ferror() to check
  for errors.

Fixes https://github.com/harfbuzz/harfbuzz/issues/2711
2020-10-13 11:18:59 -07:00
Ebrahim Byagowi 2be859d289 minor, replace nullptr checks with implicit ones 2020-04-21 00:30:34 +04:30
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
Qunxin Liu 1da1b4dc94 [subset] For option "--unicodes", add support for "*" to retain all code points 2019-07-15 11:18:50 -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 67064294a0 [subset] Add drop-tables option to hb-subset util. 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