Commit Graph
16565 Commits
Author SHA1 Message Date
Behdad Esfahbod 7c7db0fcba [subset/cff1] Minor shuffle code around 2023-06-25 19:07:40 -06:00
Behdad Esfahbod 1e09ebebc1 [subset/cff1] Minor use vector length instead of map population 2023-06-25 18:24:42 -06:00
Behdad Esfahbod 23109dde5e [subset/cff1] Minor use an exact allocation 2023-06-25 18:21:57 -06:00
Behdad Esfahbod 393f0f9f16 [map] Rename resize() to alloc()
Better matches the functionality, and hb_vector_t.
2023-06-25 18:14:56 -06:00
Behdad Esfahbod 793f663bad [vector] Speed up hb_vector_t<hb_array_t<U>> 2023-06-25 17:33:57 -06:00
Behdad Esfahbod 289bad82f0 [subset/cff1] Minor use a dagger 2023-06-25 17:26:40 -06:00
Behdad Esfahbod 31d971d1aa [vector] Sprinkle std::addressof 2023-06-25 17:23:52 -06:00
Behdad Esfahbod c03c0a9d76 [subset/cff1] Remove unnecessary remap_sid_t::reset
The object is initialized automatically.
2023-06-25 17:13:59 -06:00
Behdad Esfahbod 6ed0d04b69 [subset/cff1] In remap_sid_t::reset(), reset everything
Previous code wasn't resetting next=0; tests were passing.
It's always called when sidmap is empty. So, redundant,
but keeping as is.
2023-06-25 17:12:33 -06:00
Behdad Esfahbod 7e97233c35 [subset/cff1] Comment 2023-06-25 17:06:02 -06:00
Behdad Esfahbod 86a550dc7e [subset/cff1] Speed up string writing 2023-06-25 17:01:40 -06:00
Behdad Esfahbod dc1b172408 [subset/cff1] Minor reuse a returned value 2023-06-25 16:35:36 -06:00
Behdad Esfahbod 95341bcc15 [subset/cff1] Minor use {} initialization syntax 2023-06-25 16:31:54 -06:00
Behdad Esfahbod be0cec288b [map] Micro-optimize iteration
Make is_real() faster (removes a shift). is_used() gets inlined
so is not slowed down by this change.
2023-06-25 16:01:13 -06:00
Behdad Esfahbod 9dbea6071a [subset/cff1] Fix resource leak in error case 2023-06-25 14:28:17 -06:00
David Corbett e310473cec [use] Allow multiple CMAbv glyphs on subjoined 2023-06-25 15:29:36 -04:00
Behdad Esfahbod d4bbe3f486 [subset/cff] Reuse a calculate index total data size 2023-06-23 18:13:30 -06:00
Behdad Esfahbod ec0fbf8fa6 [subset/ClassDef] Micro-optimize use_class_zero calc
Probably never matters.
2023-06-23 16:13:13 -06:00
Behdad Esfahbod b557a84123 [algs] Speed up fasthash for aligned uint64_t 2023-06-23 15:32:42 -06:00
Behdad Esfahbod fc80d20cb5 [serialize] Only hash at most 128 bytes for object_t
Optimization. Shouldn't in reality bring down the hash performance.
Byte objects differ in their early bytes anyway.
2023-06-23 15:21:30 -06:00
Behdad Esfahbod 19eb5e3b6c [subset/cff1] Micro-optimize Charset::serialize 2023-06-23 15:12:13 -06:00
Behdad Esfahbod d36b87bde4 [vector] Speed up hb_vector_t<hb_vector_t<U>>::realloc_vector
Use in CFF subsetting.
2023-06-23 14:42:21 -06:00
Behdad Esfahbod b96eed0294 [vector] Speed up vector_t<vector_t<U>>::resize()
Used in CFF subsetting...
2023-06-23 14:30:21 -06:00
Behdad Esfahbod b80b628a8a [subset/cff1] Speed up plan_subset_charset 2023-06-23 13:41:42 -06:00
Behdad Esfahbod 1902f6ccbb [map] Inline an accessor function 2023-06-23 13:21:21 -06:00
Behdad Esfahbod 43d2ced841 [map] Minor remove a conditional 2023-06-23 13:16:51 -06:00
Behdad Esfahbod 817236dcb8 [map] Speed up is_real 2023-06-23 13:12:40 -06:00
Behdad Esfahbod 628ffd052e Merge pull request #4287 from googlefonts/tuple_varstore_compile
[instancer] compile tuple variations
2023-06-23 14:43:09 -04:00
Behdad Esfahbod 33507a9c27 [subset/cff] Micro-optimize hb_plan_subset_cff_fdselect 2023-06-23 12:40:35 -06:00
Behdad Esfahbod ecb46f7013 [subset/cff1] Comment 2023-06-23 12:18:33 -06:00
Behdad Esfahbod 4332cb3376 [subset] Fix bot failure 2023-06-23 12:03:42 -06:00
Behdad Esfahbod c4b2950deb [subset/cff1] Use cached subset-accel for seac calculations
Before we were creating a new (non-subset) accel each time.
2023-06-23 11:55:39 -06:00
Qunxin Liu b10cff9906 [instancer] address review comments
manage memory through vector when possible
2023-06-23 10:48:22 -07:00
Behdad Esfahbod 5f39913918 [subset/cff] Move lazy cff-accelerator to cff-subset-accelerator
Fixes https://github.com/harfbuzz/harfbuzz/issues/4295
2023-06-23 11:22:01 -06:00
Behdad Esfahbod 3a827123a1 [benchmark-subset] Free cached face upon exist
For better valgrind output.
2023-06-23 11:16:57 -06:00
Behdad Esfahbod 97d63e8d1d [subset/cff] Move serialize to accelerator 2023-06-23 10:43:34 -06:00
Behdad Esfahbod 7344411cc2 [subset] Sprinkle some HB_NO_SUBSET_CFF 2023-06-23 10:27:44 -06:00
Behdad Esfahbod 26f320dcd3 [subset/cff] Remove unused method 2023-06-23 10:24:32 -06:00
Behdad Esfahbod 43ec78f92c [subset/cff] Cache CFF accelerator in hb_subset_plan_t
This shows 7% speedup in:
BM_subset/subset_glyphs/SourceHanSans-Regular_subset.otf/retaingids/10
2023-06-23 10:22:30 -06:00
Behdad Esfahbod 154aae3af6 [subset] Minor use an auto variable
I need this later. :D
2023-06-22 20:41:16 -06:00
Behdad Esfahbod 64e49e0f71 [subset-cff2] Store num_glyphs in plan
Like cff1 code does.

Also, check for .notdef, like cff1 code does.
2023-06-22 20:27:20 -06:00
Behdad Esfahbod f05561dd4e [subset-cff1] Use plan.num_glyphs instead of passing again 2023-06-22 20:25:04 -06:00
Behdad Esfahbod 7a124a0b4e [cff1] Use constructor for accelerator_templ_t 2023-06-22 20:18:20 -06:00
Behdad Esfahbod ad025ddf05 [subset-cff] Simplify a bit 2023-06-22 20:09:36 -06:00
Behdad Esfahbod e1753782c1 [subset-cff] Handle an error condition 2023-06-22 19:45:29 -06:00
Behdad Esfahbod cb5f4d0c68 [subset-plan] Avoid a copy in freeing name-table-overrides 2023-06-22 18:56:17 -06:00
David Corbett d8fba5c6b0 [use] Add FM categories to POST_BASE_FLAGS64 2023-06-22 20:56:08 -04:00
Behdad Esfahbod 6a17622a75 [array] Speed up iteration
These are faster than relying on the random-access methods
(forward, rewind, item_it).
2023-06-22 18:35:10 -06:00
Behdad Esfahbod f839bd11d2 [multimap] Use one fewer object
Also fix error-checking to check for sub-object errors.
2023-06-22 17:29:57 -06:00
Behdad Esfahbod 280edb909b [map] Use a variable instead of function for is_trivial 2023-06-22 17:07:31 -06:00