Commit Graph

10385 Commits

Author SHA1 Message Date
Behdad Esfahbod 6fbb552156 s/FLAG_COMPLEX/FLAG_SHAPER/g 2022-06-03 10:30:34 +01:00
Behdad Esfahbod 6d9e94d2b8 s/hb_ot_shape_complex_categorize/hb_ot_shaper_categorize/g 2022-06-03 10:30:34 +01:00
Behdad Esfahbod a560182cb3 s/complex_var/ot_shaper_var/g 2022-06-03 10:30:34 +01:00
Behdad Esfahbod 13fbed29e4 s/HB_OT_SHAPE_COMPLEX_MAX_COMBINING_MARKS/HB_OT_SHAPE_MAX_COMBINING_MARKS/g 2022-06-03 10:30:34 +01:00
Behdad Esfahbod 44a7b3b773 s/ot_complex_shaper/ot_shaper/g 2022-06-03 10:30:34 +01:00
Behdad Esfahbod e5161977a4 s/COMPLEX_SHAPER/OT_SHAPER/g 2022-06-03 10:30:34 +01:00
Behdad Esfahbod f3a8b7f36b [algs] Test hb_hash() 2022-06-03 02:21:46 -06:00
Behdad Esfahbod 215a0afad1 [algs] Remove unused hb_coerce() 2022-06-03 01:48:46 -06:00
Behdad Esfahbod 5dc12d7d8d [cmap] Rewrite set_for() slightly 2022-06-03 01:37:02 -06:00
Behdad Esfahbod 9552955e08 Add an unlikely 2022-06-03 01:33:01 -06:00
Behdad Esfahbod 88f00ecb84 [map] Fix iter_ref () and test it 2022-06-03 01:30:27 -06:00
Behdad Esfahbod a42c624fca Convert one final use of hashmap to unique_ptr 2022-06-03 01:22:34 -06:00
Behdad Esfahbod f13a79548f [subset] Convert another use of hashmap to unique_ptr 2022-06-03 01:17:20 -06:00
Behdad Esfahbod 25f57230d5 [map] Return references from new iter_ref() 2022-06-03 01:14:35 -06:00
Behdad Esfahbod a7a688616a [cmap] Convert another map use to unique_ptr 2022-06-02 18:59:15 -06:00
Behdad Esfahbod 997d9cc466 [map] Make unique_ptr hashable 2022-06-02 18:47:42 -06:00
Behdad Esfahbod 8bb2a3326e [map] Remove unneeded assignment 2022-06-02 15:18:23 -06:00
Behdad Esfahbod d7785a6da0 [cplusplus] Add unique_ptr 2022-06-02 12:43:04 -06:00
Behdad Esfahbod bca710e8ad [gsubgpos] Use map has() instead of get() when appropriate 2022-06-02 12:06:25 -06:00
Behdad Esfahbod e9407a2bd2 Use shared_ptr<hb_set_t> in one place
See if valgrind is happy...
2022-06-02 12:00:43 -06:00
Behdad Esfahbod a42a703cb6 [shared_ptr] Clear p in destructor 2022-06-02 12:00:43 -06:00
Behdad Esfahbod f0a0dcad70 [test-map] Test hashing shared_ptr 2022-06-02 11:25:56 -06:00
Behdad Esfahbod 4c1b5d9ece Whitespace 2022-06-02 11:25:11 -06:00
Behdad Esfahbod b9230c5425 [map] Fix has() 2022-06-02 11:23:38 -06:00
Behdad Esfahbod 97ea10a63a Remove old nullptr_t hacks
Were used for hashmap before.
2022-06-02 11:23:38 -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
Behdad Esfahbod 3f6a8f69a0 [map] Remove invalid-key special-casing
Can override invalid-key value now.
2022-06-02 11:23:37 -06:00
Behdad Esfahbod 5328b73fba [map] Reduce map item size again 2022-06-02 11:23:37 -06:00
Behdad Esfahbod 4f58ae60eb [map] Keep is_used, is_tombstone as booleans 2022-06-02 11:23:37 -06:00
Behdad Esfahbod 7ec3aad20f [shared_ptr] Fix hb_hash() crash on nullptr 2022-06-02 18:22:05 +01:00
Behdad Esfahbod 4d646773cf [cplusplus] Make .reference() return T* 2022-06-02 18:22:05 +01:00
Behdad Esfahbod 7e7a4a8f05 [cplusplus] Fix build 2022-06-02 18:22:05 +01:00
Behdad Esfahbod a089d91fda [hash] Adjust hash for shared_ptr, implement it for std::hash 2022-06-02 18:22:05 +01:00
Behdad Esfahbod e037325efb [hash] Remove custom hash, rely on std::hash 2022-06-02 18:22:05 +01:00
Behdad Esfahbod 0d3d5b62ae [cplusplus] Adjustments 2022-06-02 18:22:05 +01:00
Behdad Esfahbod 0b35940a72 Make hb::shared_ptr hashable 2022-06-02 18:22:05 +01:00
Behdad Esfahbod 3817bdfd7f [hb.hh] Include hb-cplusplus.hh 2022-06-02 18:22:05 +01:00
Behdad Esfahbod e0f3cab246 [cplusplus] Add hb-cplusplus.hh
Fixes https://github.com/harfbuzz/harfbuzz/issues/2152
2022-06-02 18:22:05 +01:00
Garret Rieger 98aaecd397 [subset] fix data race touching Crap() in cff subsetting. 2022-06-01 22:50:35 +01:00
Behdad Esfahbod c88a6a9ec3 [face] Remove const from get_user_data prototype
This was done by mistake.

Since the returned user_data can be changed, face should not be marked
const. Other object types follow this parttern.
2022-06-01 09:46:41 -06:00
Behdad Esfahbod bc6ecaa262 [font-funcs] Handle case of null func but non-null destroy or user-data 2022-06-01 16:38:12 +01:00
Behdad Esfahbod 88ccbd2c43 [font-funcs] Optimize user-data/destroy storage
Fixes https://github.com/harfbuzz/harfbuzz/issues/2427
2022-06-01 16:38:12 +01:00
Behdad Esfahbod e421613e8f [sbix] Fix conditional 2022-06-01 09:07:57 -06:00
Behdad Esfahbod 55b911d863 [buffer] Mark getter functions as taking const buffer
Fixes https://github.com/harfbuzz/harfbuzz/issues/2873
2022-06-01 08:13:06 -06:00
Behdad Esfahbod 9e1479b5f0 [morx] Limit context length
Fixes https://github.com/harfbuzz/harfbuzz/issues/3097
2022-06-01 07:54:45 -06:00
Behdad Esfahbod 62e803b361 [sbix] Limit glyph extents
Fixes https://github.com/harfbuzz/harfbuzz/issues/3557
2022-06-01 07:39:20 -06:00
Behdad Esfahbod cd05d187c8 [font] Fix undefined-behavior when scales are negative
Fixes https://github.com/harfbuzz/harfbuzz/issues/3555
2022-06-01 07:27:53 -06:00
Behdad Esfahbod fc4d42ff99 [ft] Add API to notify that hb_font_t changed
New API:
- hb_ft_hb_font_changed()

Mostly reverts 56e0ff9ea1

Related https://github.com/harfbuzz/harfbuzz/issues/2270

Fixes https://github.com/harfbuzz/harfbuzz/issues/3619
2022-06-01 14:12:38 +01:00
Behdad Esfahbod e246723f0c [shape] Fail shaping internally if buffer ops exceeded 2022-06-01 05:00:06 -06:00