Commit Graph

110 Commits

Author SHA1 Message Date
Behdad Esfahbod 21ff66cbd4 [subset-cff2] Round blended Private values when instancing
Hopefully no one blends BlueScale...
2023-02-19 20:39:01 -07:00
Behdad Esfahbod a4b7033d01 [cff2-subset] Blend Private values when instancing 2023-02-19 20:39:01 -07:00
Behdad Esfahbod f10a4c9d6a [cff] Rename encode_num to encode_num_cs 2023-02-19 20:39:01 -07:00
Behdad Esfahbod c65eb5a82e [cff] Specialize cff_private_dict_op_serializer_t for CFF1/2 2023-02-19 20:39:01 -07:00
Behdad Esfahbod bf4b34e87e [subset-cff2] Don't encode vsindex in Private dict 2023-02-19 20:39:01 -07:00
Behdad Esfahbod 220caa7e09 [subset-cff2] Only encode VarStore link if any varstore 2023-02-19 20:39:01 -07:00
Behdad Esfahbod 82d9940a93 [subset-cff2] Don't encode vsindex if pinned 2023-02-19 20:39:01 -07:00
Behdad Esfahbod a88f3e8d37 [subset-cff2] Don't serialize VarStore if pinned 2023-02-19 20:39:01 -07:00
Behdad Esfahbod 2746597b69 [subset-cff2] Add flush_hintmask
Fixes https://github.com/harfbuzz/harfbuzz/issues/4125
2023-02-19 12:15:22 -07:00
Behdad Esfahbod 4867e0b192 [subset-cff2] Faster instancing
Instantiate blends during parsing. Dedups code as well.
2023-01-06 11:39:13 -07:00
Behdad Esfahbod 3757baab2c [subset-cff2] Better condition
Previous condition wasn't working for dropping axes.
2023-01-06 11:23:37 -07:00
Behdad Esfahbod acc6c13f05 [subset-cff] Round numbers when instancing 2023-01-06 11:20:41 -07:00
Behdad Esfahbod 2f174f23c3 Rename 2023-01-06 11:11:14 -07:00
Behdad Esfahbod c632a164b9 [subset/cff] Support instancing 2023-01-06 11:01:25 -07:00
Behdad Esfahbod 65d9630312 [subset-cff2] Whitespace 2022-12-02 14:59:26 -07:00
Behdad Esfahbod 6012d3b228 [subset-cff] Write out charstrings zerocopy to serializer 2022-12-01 17:33:53 -07:00
Behdad Esfahbod c7b998b355 [cff2] Don't share fd-array link
No point.
2022-11-28 16:18:21 -07:00
Behdad Esfahbod 3d9e3c2dc7 [subset-cff2] Don't share varstore object 2022-11-28 16:17:09 -07:00
Behdad Esfahbod bab8ec58b0 [subset-cff] Disable sharing when packing charstring INDEXes
Saves another 8%ish.
2022-11-21 17:46:32 -07:00
Behdad Esfahbod 0a42410dc8 [cff2] Change extents/shape stack to be just a number
Do the blending immediately.

Fixes https://github.com/harfbuzz/harfbuzz/issues/3559

Benchmark on AdobeVFPrototype shows 35% speedup. Now we're faster
than FreeType:

Benchmark                                                           Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------------
BM_Font/glyph_extents/AdobeVFPrototype.otf/hb                    -0.3792         -0.3792          1584           983          1581           982
BM_Font/glyph_extents/AdobeVFPrototype.otf/ft                    +0.0228         +0.0224          1220          1248          1218          1245
BM_Font/glyph_extents/AdobeVFPrototype.otf/var/hb                -0.3513         -0.3518          1616          1048          1613          1046
BM_Font/glyph_extents/AdobeVFPrototype.otf/var/ft                +0.0172         +0.0169          1232          1254          1230          1251
2022-05-10 13:41:12 -06:00
Behdad Esfahbod ac1bb3e39e [machinery] Move accelerators to constructor/destructor 2022-01-20 12:10:05 -07:00
Behdad Esfahbod e062376ef1 [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.)
2022-01-19 17:09:34 -07:00
Behdad Esfahbod a1e9a276eb [subset-cff2] Drop an constructor/destructor pair 2022-01-18 09:27:32 -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
Khaled Hosny 3e2734cf91 [docs] Don’t use GTK-Doc syntax for internal functions
We don’t generate docs for them, reduces the number of warnings.
2021-07-26 02:18:18 +02:00
Ebrahim Byagowi d0e2addd43 minor 2020-07-18 22:16:02 +04:30
jfkthame 1026b3d0b6
[subset] Check vector resize() call for failure (#2389)
Other .resize() calls are checked, presumably this one should be as well.
2020-05-06 13:32:24 -07:00
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
Ebrahim Byagowi 8ca9df7acb [subset] Remove not needed blob sanitize call 2020-03-10 10:40:05 +03:30
ariza 5935a1dc0b add pop_discard() calls to errror returns 2020-03-05 01:22:51 +03:30
ariza c05458ec7f update cff & cff2 subsetters 2020-03-05 01:22:51 +03:30
ariza 2792fb8ba1 first rewrite of cff/cff2 _subset with _subset2 2020-02-04 21:20:43 +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 9ff32b79b3 Merge remote-tracking branch 'upstream/master' into glyf-rebase 2019-08-29 19:53:18 +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
blueshade7 8bf989ea70 update from master 2019-07-08 17:13:29 -07:00
Michiharu Ariza 5763a92749 Merge branch 'master' into var-subset 2019-07-01 15:17:19 -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
Behdad Esfahbod 737436d3f8 Streamline HB_NO_CFF 2019-06-18 13:07:44 -07:00
Ebrahim Byagowi 9b853f755d
[cff] Use switch on multi-format structs (#1762) 2019-06-09 11:49:25 +04:30
Michiharu Ariza 4ddab6facc Merge branch 'master' into var-subset 2019-06-05 11:21:27 -07:00
Behdad Esfahbod ff7995200e Hopefully last warning fix 2019-05-14 07:44:03 -07:00
Behdad Esfahbod 7f6fca4ef7 Force-disable CFF code under disabling conditions
Subsetter size goes down from 190kb to 119kb.  Main library about 7kb.

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-05-12 10:29:47 -07:00
Behdad Esfahbod 62dfe7aea2 [cff] Minor 2019-05-10 23:18:08 -07:00
Michiharu Ariza 02ae2591d9 initialize return param subr_num in popSubrNum
also snake_cased popSubrtNum and other surrounding function names
2019-05-08 13:44:03 -07:00