Commit Graph

14626 Commits

Author SHA1 Message Date
Behdad Esfahbod 02bc4dd69b Use hb_enumerate instead of hand-coding 2022-12-03 10:10:01 -07:00
Behdad Esfahbod 4d19c724c0 [CoverageFormat1] Speed up intersects()
Speeds up SourceHanSerif/10000 benchmark (not in test suite) by
32%!
2022-12-03 09:57:29 -07:00
Behdad Esfahbod a2d33779e1 Fix arm bot build 2022-12-03 09:49:00 -07:00
Behdad Esfahbod dabbf13d40 [cmap] Speed up DefaultUVS::copy 2022-12-03 09:46:11 -07:00
Qunxin Liu 8eadb83640 [subset] Update hb_subset_input_override_name_table API
Override the name string for the NameRecord identified by name_id,
platform_id, encoding_id and language_ids specified by the user.
If a record with specified name_id does not exist, this API will create
a new NameRecord with provided info and insert it to the name table.
2022-12-02 18:05:53 -07:00
Behdad Esfahbod 29903f46b9 [benchmark-subset] Cache (preprocessed) face amongst runs 2022-12-02 18:02:55 -07:00
Behdad Esfahbod 3fb4ea29cd
Merge pull request #3914 from harfbuzz/multimap
[multimap] Add a multimap datastructure & use for gid-to-unicodes subset accelerator
2022-12-02 17:08:31 -07:00
Behdad Esfahbod ddeac3658b [test-multimap] More tests 2022-12-02 16:51:07 -07:00
Behdad Esfahbod ff419789ef [subset-plan] Sort unicode_to_new_gid_list when needed 2022-12-02 16:43:33 -07:00
Behdad Esfahbod 1a40da4ad1 [subset-plan] Use add_array instead of add_sorted_array
That vector is not declared as sorted.
2022-12-02 16:13:37 -07:00
Behdad Esfahbod 32e049a315 [subset-plan] Use gid-to-unicodes multimap
One test fails. Need investigation.
2022-12-02 16:09:10 -07:00
Behdad Esfahbod da7961b2e8 . 2022-12-02 16:08:40 -07:00
Behdad Esfahbod 7d6893a803 [subset-accelerator] Cache gid-to-unicodes 2022-12-02 15:50:52 -07:00
Behdad Esfahbod 10c8fc5553 [multimap] Add a multimap datastructure 2022-12-02 15:50:49 -07:00
Behdad Esfahbod a42fc8ec4a [subset-accelerator] Adjust in_error() 2022-12-02 15:41:18 -07:00
Behdad Esfahbod 65d9630312 [subset-cff2] Whitespace 2022-12-02 14:59:26 -07:00
Behdad Esfahbod b33297ee26 [cff2] Remove unused typedef 2022-12-02 14:43:37 -07:00
Behdad Esfahbod 3ade2ffaa5 [serialize] Adjust pop_discard for zerocopy 2022-12-02 14:26:36 -07:00
Behdad Esfahbod 043eeb29a3 [subset-cff] Optimize encode_subrs
Don't loop over all original subrs. Just walk over closure subrs.
2022-12-02 13:58:36 -07:00
Behdad Esfahbod 0ad5977cd6 [subset-cff] Simplify hinting processing
We already have drop_hints in the params.
2022-12-02 13:41:36 -07:00
Behdad Esfahbod 16cbe41bca
Merge pull request #3910 from googlefonts/repacker_fuzz
[repacker] Add a fuzzer for the hb-subset-repacker api.
2022-12-02 12:43:13 -07:00
Behdad Esfahbod 2a7a1d5a73 [Coverage] Avoid timeout on broken ranges
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53929
2022-12-02 12:33:24 -07:00
Behdad Esfahbod c947652768 [subset-cff] Micro-optimize 2022-12-02 12:01:35 -07:00
Behdad Esfahbod a24d4e9261 [array] Oops. Fix memcpy copy()! 2022-12-02 12:01:35 -07:00
Behdad Esfahbod 5e41766bb9 [array] Fix hb_bytes_t memcpy copy
Wasn't being used!
2022-12-02 12:01:35 -07:00
Behdad Esfahbod a5616227ca [subset-cff] Fix buffer size calculation 2022-12-02 12:01:35 -07:00
Behdad Esfahbod 015af5a8e5 [subset-cff] Write a couple loops as range-based for 2022-12-02 12:01:35 -07:00
Behdad Esfahbod bfbbd4af25 [subset-cff] Copy str for call ops 2022-12-02 12:01:35 -07:00
Behdad Esfahbod c755b3884f [subset-cff] Pre-alloc enough for check-less copy 2022-12-02 12:01:35 -07:00
Behdad Esfahbod 062e59ae67 [subset-cff] Optimize vector allocation for preprocessed input 2022-12-02 12:01:35 -07:00
Behdad Esfahbod 8e9e94dba9 Revert "[vector] Optimize grow_vector() for size"
This reverts commit 1dd9396c7a.

Is faster indeed.

15% on SourceHanSans/10000 benchmark.
2022-12-02 12:01:35 -07:00
Behdad Esfahbod 2644540a74 [subset-cff] Compact parsed strings if using accelerator
Saves 32% on SourceHanSans/10000 benchmark!

Also, use memcmp now for writing out strings since now that our
ops are not super short, that's faster.

This makes cff-japanese test takes super long though; that needs
inspection.
2022-12-02 12:01:35 -07:00
Behdad Esfahbod 6012d3b228 [subset-cff] Write out charstrings zerocopy to serializer 2022-12-01 17:33:53 -07:00
Garret Rieger 16f61a1c87 [repacker] only build repacker fuzzer when experimental api is enabled. 2022-12-02 00:02:14 +00:00
Behdad Esfahbod 36e1a6339c [cff] Add total_size to INDEX 2022-12-01 17:00:03 -07:00
Behdad Esfahbod 3843000660 [serialize] Add start_zerocopy() 2022-12-01 16:48:22 -07:00
Garret Rieger de5a621322 [repacker] enforce root node having no incoming edges. 2022-12-01 23:37:16 +00:00
Behdad Esfahbod a2681c37c1 [cff-subset] Simplify INDEX serialize() more 2022-12-01 16:15:23 -07:00
Behdad Esfahbod c4b05878cb [subset-cff] Remove INDEX unused serialize() methods 2022-12-01 15:56:37 -07:00
Behdad Esfahbod b3ad4d72cc [cff] Another no-memset in INDEX 2022-12-01 15:46:00 -07:00
Behdad Esfahbod 5fd2f255fc [open-type] Don't memset 0 in serialize for ArrayOf family
Not necessary.
2022-12-01 15:18:59 -07:00
Garret Rieger 30e405e470 [repacker] ensure link obj indices are valid. 2022-12-01 22:12:59 +00:00
Behdad Esfahbod 70ac6dfb28 [subset-cff] Don't memset 0 INDEX and other serialize methods
Not necessary.
2022-12-01 14:58:25 -07:00
Garret Rieger 554ed06fac [repacker] add cycle detection to the graph sort.
This allows us to bail early if the graph is not acyclic.
2022-12-01 21:52:37 +00:00
Behdad Esfahbod a66de336fb [vector] Minor use get_size() in as_bytes() 2022-12-01 14:32:13 -07:00
Behdad Esfahbod 0b826368fd [serializer] Don't memset memory in embed
Not necessary.
2022-12-01 14:23:25 -07:00
Behdad Esfahbod 3b68c7146f [array] Don't clear serializer buffer when copying out
Not needed.
2022-12-01 14:19:27 -07:00
Behdad Esfahbod 57808609c9 [VarData] Move an unlikely 2022-12-01 14:03:56 -07:00
Garret Rieger 9e99d08470 [repacker] validate link widths during repacker setup. 2022-12-01 20:17:41 +00:00
Garret Rieger edf7a29595 [repacker] Validate link positions before running the repacker. 2022-12-01 20:17:41 +00:00