Garret Rieger
6e87481731
[subset] add virtual links to keep the gdef varstore last.
2024-03-28 23:00:54 +00:00
Bruce Mitchener
3cfdbd6717
Use noexcept on swap, move constructors, etc.
2024-02-17 11:04:10 +01:00
Lőrinczy, Zsigmond
4c77bd921c
Update hb-serialize.hh ( #4576 )
...
* Update hb-serialize.hh
This version does compile with g++ 4.8.3 which is the newest available version on Aix5.3
* Update hb-serialize.hh
Back to the original version, just without `this->`
2024-02-06 09:51:49 -07:00
Behdad Esfahbod
db3aeeb547
[subset] Fix cast-align issue
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/4316
2023-07-09 12:32:49 -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
a92b288e65
[serializer] Handle snapshotting when current is nullptr
...
Happens with memory failure / fuzzing.
Fixes https://oss-fuzz.com/testcase-detail/6292420615340032
2023-06-06 14:32:25 -06:00
Behdad Esfahbod
89ce804833
[serialize] Remove attribute malloc
...
This broke tests. It wasn't technically correct.
2023-06-04 10:20:39 -06:00
Behdad Esfahbod
3f2a1b644a
Fix build
2023-06-04 10:13:53 -06:00
Behdad Esfahbod
e1715056fc
[serialize] One more attribute
2023-06-04 10:09:02 -06:00
Behdad Esfahbod
15048e50ec
[serialize] Add more function attributes
2023-06-04 10:07:04 -06:00
Behdad Esfahbod
aad12ca649
[serialize] Add a few function attributes
2023-06-04 09:57:51 -06:00
Garret Rieger
f3b4d35f36
[subset] Fix fuzzer crash.
...
https://oss-fuzz.com/testcase-detail/6608005089853440
2023-05-30 18:56:48 +02:00
Behdad Esfahbod
a4b7033d01
[cff2-subset] Blend Private values when instancing
2023-02-19 20:39:01 -07:00
Behdad Esfahbod
2eacc37e08
[vector] Add internal API for exact-size allocation
...
Use it from a couple of places.
2022-12-31 12:30:31 -07:00
Behdad Esfahbod
071a2bb4f7
[serialize] Support zerocopy while sharing
2022-12-03 13:03:38 -07:00
Behdad Esfahbod
3ade2ffaa5
[serialize] Adjust pop_discard for zerocopy
2022-12-02 14:26:36 -07:00
Behdad Esfahbod
6012d3b228
[subset-cff] Write out charstrings zerocopy to serializer
2022-12-01 17:33:53 -07:00
Behdad Esfahbod
3843000660
[serialize] Add start_zerocopy()
2022-12-01 16:48:22 -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
1fed366d5b
[serialize] Shut compiler warning off
2022-11-25 12:37:24 -07:00
Behdad Esfahbod
59c45f6deb
Use hb_memcpy instead of memcpy consistently
2022-11-22 12:54:50 -07:00
Behdad Esfahbod
3d1c76f713
[serializer] Don't hash objects twice
2022-11-21 19:40:32 -07:00
Behdad Esfahbod
afd716d4cd
[serialize] Don't free object-pool in reset()
2022-11-16 12:28:56 -07:00
Garret Rieger
07fd0528c0
[repacker] add graph equality check.
...
Does not compare topological sorting, but looks for equivalence of the two graphs.
2022-08-15 23:16:51 +00:00
Behdad Esfahbod
f4f7d691af
Merge pull request #3779 from harfbuzz/split_pair_pos_2
...
[repacker] Add PairPosFormat2 table splitting in the repacker.
2022-08-09 22:23:23 -06:00
Qunxin Liu
7fde6ab025
fuzzer fix: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49790
2022-08-05 15:10:31 -06:00
Garret Rieger
a733a9afa5
[repacker] insert new subtables immediately after the subtable they split from in the lookup.
2022-08-05 00:32:47 +00:00
Behdad Esfahbod
b3f689e7e5
[serializer] Remove TODO that's not gonna happen
2022-06-10 07:31:47 -06:00
Behdad Esfahbod
3f78a71ca0
[map] Finally! Just can usd hb_hashmap_t<obj_t, obj_t>
...
Yay!
2022-06-02 11:23:37 -06:00
Behdad Esfahbod
0ccab339f9
[map] Remove invalid-key template arguments since unused
2022-06-02 11:23:37 -06:00
Garret Rieger
cbf8f44c9b
[subset-perf] swap instead of copying vertice's when reordering during sort.
2022-05-20 09:41:18 -06:00
Behdad Esfahbod
6eaa22e9d7
[serialize] Reduce link_t size from 16 to 12
2022-05-19 18:16:54 -06:00
Qunxin Liu
a35757c6bc
[repacker] expose hb_subset_repack() API, hb_object_t and hb_link_t structs
2022-03-10 17:26:20 -07:00
luz paz
e2e305066a
Fix various typos
...
Found via `codespell -q 3 -S ./perf/texts -L actualy,ba,beng,fo,gir,inout,nd,ot,pres,ro,te,teh,timne`
2022-01-16 05:39:03 -08:00
Behdad Esfahbod
8a69e00639
[meta] Use std::addressof() instead of hb_addressof()
2022-01-13 16:17:34 -07:00
Garret Rieger
39e76af19e
[subset] add all_links () to object_t.
...
Helper to provide easy access to concatenated real and virtual links iterator.
2021-12-01 08:37:04 -07:00
Garret Rieger
9121ed0cec
[subset] Improve sharing of Ligature subtables.
...
Ligature subtables use virtual links to enforce an ordering constraint between the subtables and the coverage table. Unfortunately this has the sideeffect of prevent the subtables from being shared by another Ligature with a different coverage table since object equality compares all links real and virtual. This change makes virtual links stored separately from real links and updates the equality check to only check real links. If an object is de-duped any virtual links it has are merged into the object that replaces it.
2021-12-01 08:37:04 -07:00
Behdad Esfahbod
394f772937
[map] Allow storing classes in the hashmap
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3293
The trick was to change the type of the invalid key/value to be non-class.
2021-11-19 11:49:23 -07:00
Garret Rieger
9643d77086
[repacker] add more detailed comment about virtual links.
2021-11-02 12:19:13 -06:00
Garret Rieger
5bfc7d1015
[repacker] remove VirtualOffset struct.
...
Make and add_virtual_link () specialization of add_link() instead.
2021-11-02 12:19:13 -06:00
Garret Rieger
bc4c5341d6
[repacker] Add test for virtual links in the repacker.
2021-11-02 12:19:13 -06:00
Garret Rieger
7615b94ecf
[repacker] add 'virtual links' to the serializer.
...
These aren't associated with an offset field, but instead exist solely to add an ordering constraint to the object graph.
2021-11-02 12:19:13 -06:00
Behdad Esfahbod
943921cf0c
[meta] Use more std type_traits
2021-11-02 00:26:46 -06:00
Behdad Esfahbod
6d555ce82e
[meta] Use std::forward instead of hb_forward()
2021-11-02 00:18:22 -06:00
Garret Rieger
2bd911b8b4
[subset] handle cmap4 overflows.
...
If a cmap4 subtable overflows during serialization drop it and the corresponding EncodingRecord. Don't drop the corresponding cmap12 table if it would have otherwise been removed.
2021-09-02 14:43:17 -06:00
Behdad Esfahbod
087e2705de
Fix signed-ness error in 0ded6a70c8
2021-07-28 11:42:48 -06:00
Behdad Esfahbod
0ded6a70c8
[subset] Fix another fuzzer issue
...
Addition could overflow on 32bit arch.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36636
Fixes https://oss-fuzz.com/testcase-detail/5072358514753536
2021-07-28 11:35:27 -06:00
Behdad Esfahbod
7b8464b655
[serialize] Check for overflow in allocate_size()
...
If size was > INT_MAX, then the out-of-room check was failing to perform
as intended.
Part of fixing https://oss-fuzz.com/testcase-detail/5362189182566400
2021-07-27 13:26:00 -06:00
Behdad Esfahbod
2337f0d047
Internally use hb_malloc/.../hb_free instead of malloc/.../free
...
Redefining those stock names as macros was conflicting with gcc 10
headers.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
2021-07-08 10:54:09 -07:00