Commit Graph

9062 Commits

Author SHA1 Message Date
Maks Naumov 4c19aa2620 Fix MSVC C4068 warning (#1656) 2019-04-05 11:46:27 -07:00
Michiharu Ariza e44b83aac0 replace test font SourceHanSans with its subet 2019-04-05 10:15:08 -07:00
Maks Naumov a96d003d6e Fix MSVC C4138 warning (#1657) 2019-04-05 02:29:56 -07:00
Behdad Esfahbod c68eb7002f Minor 2019-04-03 16:24:12 -07:00
Behdad Esfahbod 85adf4ad5c [GDEF] Don't assume glyphlist is sorted
As was hit by the fuzzer.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14032
2019-04-03 16:07:36 -07:00
Behdad Esfahbod ecabdffc61 [algs] Add hb_min() and hb_max() 2019-04-03 16:06:34 -07:00
Behdad Esfahbod 7b863142ce [serialize] Make putting breakpoint on out-of-memory easier 2019-04-03 15:48:27 -07:00
Behdad Esfahbod 2bd2750234 [iter] Tweak SFINAE again
Don't think we need hb_is_same().
2019-04-03 15:31:53 -07:00
Behdad Esfahbod f02ebc89ec [array] Add compy assignment operator since copy constructor is explicit 2019-04-03 15:23:06 -07:00
Behdad Esfahbod 20a73da2c9 [array] Add default copy constructor
MSVC seems to need it.
2019-04-03 14:32:15 -07:00
Behdad Esfahbod d419a9a437 [iter] Use different SFINAE scheme to make MSVC happy
From Orvid King: TLDR; MSVC has some issues using sizeof(declval<T>()) for
SFINAE of templated types, so I just used SFINAE in a different context where
MSVC doesn't have the issue.
2019-04-03 14:18:19 -07:00
Behdad Esfahbod 2778df7972 [meta] Add hb_is_same() 2019-04-03 14:15:01 -07:00
Michiharu Ariza b999ce9bf0 Merge branch 'master' into var-subset 2019-04-03 10:34:09 -07:00
Michiharu Ariza c2d727a479 fix xshift by (lsb - xMin) 2019-04-03 10:33:55 -07:00
Behdad Esfahbod 6215fb8e68 [serialize] Actually reclaim storage from duplicate objects 2019-04-02 23:10:03 -07:00
Behdad Esfahbod 3305a2cad2 [serialize] Port to use object pool
Tested, but feels fragile :(.
2019-04-02 22:58:49 -07:00
Behdad Esfahbod 5efbc01174 [pool] Uses memset() instead of assigning Null()
Assignment is invalid on invalid object.
2019-04-02 22:41:06 -07:00
Behdad Esfahbod 434d78bf91 Add hb_pool_t<> for pooled memory allocation 2019-04-02 21:46:40 -07:00
Behdad Esfahbod 8e4df1a152 [serialize] Disable packed_map again
Ugh.  Need to think of something else.
2019-04-02 20:20:53 -07:00
Behdad Esfahbod 31c1a83899 [map] Protect more against pointer deref 2019-04-02 20:17:27 -07:00
Behdad Esfahbod 5bffa9e375 More 2019-04-02 20:13:16 -07:00
Behdad Esfahbod 5b66b033fd [serialize] Fix hb_hashmap_t<> for pointers and use in packed_map 2019-04-02 19:30:22 -07:00
Behdad Esfahbod 42ab32cbba [iter] Remove passing pointer to hb_iter()
While doable with hb_deref_pointer() as well, we also would then
need to do it in a ton of places.  Not worth it / messy.
2019-04-02 18:42:51 -07:00
Behdad Esfahbod d0da547b37 [array] Use dagger for hashing array
Also switch to better mixing.
2019-04-02 18:23:05 -07:00
Behdad Esfahbod b6f29bf141 [iter] Accept pointers in hb_iter()
No idea how to avoid dupicating code.  Was hoping hb_deref_pointer()
would do it, but looks like a pointer can't bind to a universal
reference T&&.  Humm.
2019-04-02 18:12:01 -07:00
Behdad Esfahbod fc24bb9046 [serialize] Towards maintaining packed_map 2019-04-02 17:49:52 -07:00
Behdad Esfahbod aa2293a55e [serialize] Minor 2019-04-02 17:42:10 -07:00
Behdad Esfahbod e42b82c828 [serialize] Handle non-nullable offsets 2019-04-02 17:23:16 -07:00
Behdad Esfahbod e04518bafc [serialize] Movce empty-object handling earlier 2019-04-02 17:20:04 -07:00
Behdad Esfahbod 7f73c9744e [serialize] Minor 2019-04-02 17:12:24 -07:00
Michiharu Ariza 27d3bac8ef fix 2x2 component transform 2019-04-02 17:02:11 -07:00
Behdad Esfahbod 5a3de4f4f8 [serialize] Allow offset links that have base offset from the object base
Rarely used, but used, in name table or similar constructs.
2019-04-02 16:53:42 -07:00
Ebrahim Byagowi edad6b2c45
[test][iter] minor, fix double promotion warning 2019-04-03 00:48:59 +04:30
Michiharu Ariza 8801b80d72 refix: orig_points must be saved before any adjustment 2019-04-02 13:10:36 -07:00
Michiharu Ariza ee58f6012e infer gvar deltas for each region (not after accumulation) 2019-04-02 11:24:29 -07:00
Michiharu Ariza 2c31652c8a fix private_indices vs shared_indices 2019-04-02 10:07:43 -07:00
Ebrahim Byagowi 062f5d6e7a
[test] minor, c style comments 2019-04-02 20:27:00 +04:30
Ebrahim Byagowi afdbf960d6
[iter][test] Add another test for hb_reduce
Different initial and accumulator types
2019-04-02 20:25:06 +04:30
Behdad Esfahbod bfa02bef45 [serialize] Switch to tetris-packing 2019-04-01 21:36:13 -07:00
Behdad Esfahbod f0ea3ac17b [serialize] Fix linking 2019-04-01 21:36:03 -07:00
Behdad Esfahbod 7c0e2054e0 [serialize] Minor 2019-04-01 21:32:29 -07:00
Michiharu Ariza dce9e5e622 fix get_start_tuple, get_end_tuple 2019-04-01 20:55:02 -07:00
Behdad Esfahbod 64d0f08938 [cmap] Minor 2019-04-01 16:56:41 -07:00
Behdad Esfahbod 2e675cc7b5 [subset] Call serialize start/end around it
To be cleaned up.
2019-04-01 16:56:41 -07:00
Behdad Esfahbod abe33c6149 [serialize] Assert stack 2019-04-01 16:56:41 -07:00
Behdad Esfahbod 72e9b2c16c [serialize] Add add_link() to add link 2019-04-01 16:56:41 -07:00
Behdad Esfahbod 74addbecac [serialize] Add default template type to push() 2019-04-01 16:56:41 -07:00
Ebrahim Byagowi b8642087e6 [iter] hb_reduce, accumulator with a different type 2019-04-01 16:56:29 -07:00
Ebrahim Byagowi e526414c75 [iter] Implement hb_reduce 2019-04-01 16:56:29 -07:00
Michiharu Ariza 72545cb839 fixed off by one bug in apply_deltas_to_points() 2019-04-01 16:49:15 -07:00