Commit Graph

78 Commits

Author SHA1 Message Date
Behdad Esfahbod e91863b717 [subset-cff] Pre-size map in subr_remap_t::create() 2022-05-18 12:39:55 -06:00
Behdad Esfahbod b5aa8a27ea [subset-cff] Cosmetic 2022-05-18 11:58:58 -06:00
Behdad Esfahbod 0b201623f5 [subset-cff] Fix previous commit
Oops!
2022-05-18 11:58:22 -06:00
Behdad Esfahbod 4792309265 [subset-cff] Access vector directly 2022-05-18 11:54:08 -06:00
Behdad Esfahbod 7c86f2e763 [subset-cff] Pre-alloc out buffer 2022-05-18 11:45:27 -06:00
Behdad Esfahbod 0761e7cdfd [subset-cff] Avoid resetting buffer as encoder does 2022-05-18 11:38:25 -06:00
Behdad Esfahbod 71aa10a394 [subset-cff] Manually grow vector to avoid memset overhead 2022-05-18 11:37:24 -06:00
Behdad Esfahbod f455cc53fd [subset-cff] Reuse buffer allocation 2022-05-18 11:31:55 -06:00
Behdad Esfahbod fb413f5202 [subset/cff] Don't use bitfields for hot bools
The struct has room because of alignment, and these bools are hot.
2022-05-16 17:38:18 -06:00
Behdad Esfahbod f08537963b [cff-subset] Pre-alloc vector for operator decoding 2022-05-11 12:14:49 -06:00
Behdad Esfahbod bff78e6515 [cff] Convert interpretation environment to use constructor 2022-05-10 16:50:38 -06:00
Behdad Esfahbod de053e2efb [cff] Convert subr_subset_param_t to use constructor 2022-05-10 16:17:20 -06:00
Behdad Esfahbod 8aa54aaca2 [cff] Replace byte_str_t with hb_bytes_t use 2022-05-09 17:34:58 -06:00
Behdad Esfahbod fe783ac091 [cff] Remove op_str_t nop init/fini 2022-01-18 13:38:28 -07:00
Garret Rieger f1dc8b087c [subset-cff] Convert subr_closures_t to constructor/destructor instead of init/fini. 2022-01-18 10:29:04 -08:00
Behdad Esfahbod a48aa9850a [subset-cff] Remove another set of fini_deep 2022-01-18 09:32:58 -07:00
Behdad Esfahbod de2cef42b4 [bimap] Remove init/fini 2022-01-18 09:21:31 -07:00
Garret Rieger 46d4a5e673 [subset] Convert subset plan to use a flags bit set. 2021-07-29 18:02:34 -07:00
Garret Rieger 32f052b033 [ENOMEM] Fix several instances of not checking resize in CFF. 2020-07-31 02:04:06 +04:30
Ebrahim Byagowi 2be859d289 minor, replace nullptr checks with implicit ones 2020-04-21 00:30:34 +04:30
Ebrahim Byagowi 2dda6dd744 minor, tweak spacing
turn 8 spaces to tab, add space before Null/Crap
2020-04-20 16:18:29 +04:30
ariza 0b29053864 removed unused code 2020-03-05 10:11:23 +03:30
ariza e8f010d793 removed unused code & data; rename 2020-03-05 10:11:23 +03:30
ariza c05458ec7f update cff & cff2 subsetters 2020-03-05 01:22:51 +03:30
Ebrahim Byagowi ce114d6b27 minor, tweak spaces 2019-12-31 15:53:02 +03:30
Ebrahim Byagowi 453050ad30 Merge remote-tracking branch 'upstream/master' into var-subset 2019-10-13 08:45:29 +03:30
Ebrahim Byagowi c7621cf211 Minor, replace hb_set_add with private API 2019-10-08 15:40:29 +03:30
Ebrahim Byagowi 0558413f27 Minor, tweak spaces 2019-10-01 13:50:11 +03:30
blueshade7 8bf989ea70 update from master 2019-07-08 17:13:29 -07:00
Michiharu Ariza f3ee2bd020 add ops & methods to hb_bimap_t making it more like hb_map_t
moved has () to hb_bimap_t from hb_inc_bimap_t
moved identity () to hb_inc_bimap_t
removed forward()
2019-06-25 13:52:40 -07:00
Michiharu Ariza 094966959f add hb_bimap_t, subclass hb_inc_bimap_t replacing CFF::remap_t 2019-06-25 13:52:40 -07:00
Michiharu Ariza a1177fec8f Merge branch 'master' into var-subset
rebase master
2019-03-29 23:23:49 -07:00
Behdad Esfahbod b986c6a321 [C++11] Remove IntType::set() in favor of operator= 2019-03-29 20:21:21 -07:00
Michiharu Ariza f289ffe5ea renamed hb_map2_t to hb_bimap_h in its own .hh 2019-03-14 16:58:02 -07:00
Michiharu Ariza c485b77c7c fix CFF2 local subr subsetting
bug exposed by impl change of fdmap
also fixed name of subr_remap_ts as subr_remaps_t
2019-03-14 16:58:02 -07:00
Michiharu Ariza c8420109cc subset HVAR
Re-implemented & repurposed CFF:remap_t as hb_map2_t (moved to hb-ot-layout-common.hh) for two-way mapping for use by index map subsetting.
Hooked up HVAR subsetter through _subset2.
Some renaming in CFF code.
2019-03-14 16:58:02 -07:00
Michiharu Ariza c6af846178 tweaked --desubroutinize to remove hintmask only subrs 2019-02-12 15:10:43 -08:00
Michiharu Ariza f2908b4d8f Implement subset --regain-gids option with CFF1/2
along with api tests & expected results
2019-01-31 14:16:37 -08:00
Behdad Esfahbod d25a2f1496 Fix a few warnings 2018-12-23 20:34:24 -05:00
Ebrahim Byagowi ae6e348d64 Minor, tweak spaces 2018-12-22 20:07:57 +03:30
Michiharu Ariza 29f0b6bce7 CFF renaming (#1507)
* reimplement ByteStr as byte_str_t based on hb_ubytes_t

Unuse start_embed<ByteStr>
Also renamed SubByteStr to byte_str_ref_t
More renaming to come

* substr renamed to str_ref in line with its type byte_str_ref_t

* uncamelize non-table struct names

* uncamelized non-struct types OpCode etc

* add byte_str_t copy ctor

* test

* test2

* undo tests

* fix bot failure

* undo the previous change

* fixed tabs, added inline

* Revert "fixed tabs, added inline"

This reverts commit 21163c30e9.

* fix tabs
2018-12-22 10:47:04 -05:00
Behdad Esfahbod 474a12058d [array/vector] Rename len to length 2018-12-21 18:53:01 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Ebrahim Byagowi b2ebaa9afa Remove redundant 'inline' from methods (#1483) 2018-12-16 14:08:10 -05:00
Michiharu Ariza bcb4ecaf68 [CFF] check out of range FD index (#1477)
* add fd index checks to subr subsetter

also added oss-fuzz test case

* undid SubrSubsetParam::is_valid

because already validated by SubrClosures.valid
2018-12-12 20:36:01 -05:00
Michiharu Ariza 2941208f1e [CFF] oss-fuzz issue 11690 ASSERT: substr.offset >= opStart (#1461)
* fix oss-fuzz 11690: substr.offset >= opStart

detect recursive subroutine call & handle as error

* fix build failure

* add minimized test case for oss-fuzz 11690

* removed asserts
2018-12-11 15:21:24 -05:00
Michiharu Ariza 333586245c minimize use of assert: removed or changed to error handling (#1467) 2018-12-11 15:20:20 -05:00
Behdad Esfahbod 825df6dbc7 [CFF] Change spaces to tabs 2018-11-30 23:04:59 -05:00
Behdad Esfahbod 592f39b3c4 [CFF] Whitespace 2018-11-30 22:54:57 -05:00
Michiharu Ariza d8c6913765 undo 0u 2018-11-30 18:58:14 -08:00