Commit Graph

322 Commits

Author SHA1 Message Date
Behdad Esfahbod 93328cedfc [Device] Save a map get() 2022-12-03 12:49:26 -07:00
Behdad Esfahbod 02bc4dd69b Use hb_enumerate instead of hand-coding 2022-12-03 10:10:01 -07:00
Behdad Esfahbod 57808609c9 [VarData] Move an unlikely 2022-12-01 14:03:56 -07:00
Behdad Esfahbod 8805a866b5 [ClassDef2] Write a few loops as range-based for 2022-11-30 17:18:04 -07:00
Behdad Esfahbod 2fecf2aa19 [ClassDef] Minor rename 2022-11-29 21:25:01 -07:00
Behdad Esfahbod 8f632ca884 [ClassDef] Write another loop as range for 2022-11-29 21:23:35 -07:00
Behdad Esfahbod 87b12aee13 [ClassDef] Write a couple loops as range for 2022-11-29 21:18:48 -07:00
Behdad Esfahbod ccd40c842c [ClassDef] Optimize intersected_class_glyphs 2022-11-29 21:15:19 -07:00
Behdad Esfahbod 44c585a6df [ClassDef] Fix disabled codeblock 2022-11-29 20:52:48 -07:00
Behdad Esfahbod 9b7617d433 [ClassDef2] Use a faster algorithm in subset()
Speedup across the board; up to 40% for MPlus1 at small sizes.
2022-11-29 20:29:58 -07:00
Behdad Esfahbod ae5e6d562b [ClassDef2] Micro-optimize 2022-11-29 15:48:38 -07:00
Behdad Esfahbod dc82334061 Remove a couple of unneeded .iter() invocations 2022-11-29 15:26:55 -07:00
Behdad Esfahbod d2a2670e54 [iter] Simplify has() interface implementations 2022-11-28 19:43:09 -07:00
Behdad Esfahbod 06e2147a48 More call set->next() directly 2022-11-24 14:56:04 -07:00
Behdad Esfahbod 196c9db06f Call ->next() directly 2022-11-24 14:51:52 -07:00
Behdad Esfahbod 59c45f6deb Use hb_memcpy instead of memcpy consistently 2022-11-22 12:54:50 -07:00
Behdad Esfahbod a0bde1e1ea [open-type] Remove (Sorted)ArrayOf.sub_array() 2022-11-16 21:27:12 -07:00
Garret Rieger 83769b9cb1 [subset] add comment for why we retain empty lookups. 2022-10-21 18:29:23 -06:00
Garret Rieger 70e2de2bd4 [subset] Always output Lookup's even if they are empty.
The rest of layout subsetting depends on lookup indices being consistent with those computed during planning. So if an empty lookup is discarded during the subset phase it will invalidate all subsequent lookup indices. Generally we shouldn't end up with an empty lookup as we pre-prune them during the planning phase, but it can happen in rare cases such as when a subtable is considered degenerate (eg. #3853)
2022-10-21 18:29:23 -06:00
Joel Auterson c813f84235 Make build work for arm-none-eabi 2022-10-21 11:09:35 -06:00
Qunxin Liu b706c6f77e [instance] update FeatureList with variations 2022-09-29 12:14:43 -06:00
Qunxin Liu 8f3a7017c3 [instance] support FeatureVariations table 2022-09-29 12:14:43 -06:00
Qunxin Liu f4813e3b7f [instance] update collect_lookups/prune_features()/closure_features() with variations
Some features will be substituted with variations, so we do not collect
lookups from the original feature tables.
2022-09-29 12:14:43 -06:00
Qunxin Liu 64e2f2fc58 [instance] store active featurevariation record/condition idxes in the plan 2022-09-29 12:14:43 -06:00
Qunxin Liu 9ab6605f20 [instance] update GDEF table 2022-09-01 09:35:22 -07:00
Qunxin Liu b72995ff16 [instance] GDEF table: collect both varidxes and deltas 2022-09-01 09:33:02 -07:00
Qunxin Liu e03043bd0b [subset] don't let VariationStore subset() produce inner_maps
Make it a subset-planning object so VariationStore can subset to
specified inner_maps.

Also add a layout_variation_idx_delta_map in subset_plan
2022-09-01 09:32:41 -07: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
Behdad Esfahbod c67c1b745b VarStore: simplify again 2022-08-04 11:42:22 -06:00
Qunxin Liu d831e935df bug fix in VarData get_delta ()
when LONG_WORDS flag is set, item row is not computed correctly
lcursor should be interpreted as INT32
2022-08-04 11:40:42 -06:00
Behdad Esfahbod 3da50c50aa Remove unused const 2022-07-29 11:57:15 -06:00
Garret Rieger 3f7a74ff40 [repacker] WIP extension promotion implementation. 2022-07-26 12:22:17 -06:00
Behdad Esfahbod 4cb83967aa [subset/ClassDefFormat2] Fix timeout
Fixes https://oss-fuzz.com/testcase-detail/5417800474165248
2022-07-23 11:00:20 -06:00
Behdad Esfahbod f94a3ba1db [varStore] Better protect against HB_NO_VAR builds 2022-07-23 10:36:08 -06:00
Behdad Esfahbod 5a9c7930ef Add HB_NO_BEYOND_64K 2022-07-22 21:33:31 -06:00
Behdad Esfahbod 7cdde6a241 [ClassDef] Write a loop as range for 2022-07-21 17:18:45 -06:00
Behdad Esfahbod 00dfbbce1c [Coverage] Rename and templatize intersected_coverage_glyphs 2022-07-21 11:45:05 -06:00
Behdad Esfahbod 8d923363db [layout] Reduce number of closure rounds 2022-07-20 12:09:00 -06:00
Behdad Esfahbod f3151b6582 [ArrayOf family] Use memory barrier before accessing array
Without it, the compiler was reordering and batching the read
of array length and array[0] if the 0'th member was accessed
constantly and function was inlined.  This felt safe to the
compiler because HB_VAR_ARRAY is 1, but could be unsafe actually.
The memory barrier disallows that.

This was found by afl/honggfuzz address sanitizers.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49187
2022-07-17 16:22:29 -06:00
Behdad Esfahbod 1327d8e3df [layout-common] Reshuffle code so Feature is defined before it's used 2022-07-15 16:03:38 -06:00
Garret Rieger c1e280ea78 [reorg] Move Coverage, RangeRecord into new namespace layout. 2022-07-13 20:25:13 -06:00
Behdad Esfahbod df7eebf40a [>64k:layout] Fix layout of RangeRecord
https://github.com/be-fonts/boring-expansion-spec/issues/30
2022-07-12 13:42:52 -06:00
Behdad Esfahbod 9ef9fc0114 [>64k:layout] Templatize GSUBGPOSFormat1 2022-07-12 13:42:52 -06:00
Behdad Esfahbod 5fd0a3f0b9 [>64k:layout] Templatize GSUBGPOSFormat1 2022-07-12 13:42:52 -06:00
Behdad Esfahbod ca5c8a6419 [>64k:layout:Coverage] Implement format 3/4
Implements rest of https://github.com/be-fonts/boring-expansion-spec/issues/30
2022-07-12 13:42:52 -06:00
Behdad Esfahbod 25de6fb4e7 [>64k:layout:ClassDef] Implement format 3/4
This implements part of https://github.com/be-fonts/boring-expansion-spec/issues/30
2022-07-12 13:42:52 -06:00
Behdad Esfahbod 9286526f37 [>64k:layout] Templatize Coverage & ClassDef
Have not added new formats yet.
2022-07-12 13:42:52 -06:00
Behdad Esfahbod e8cce9d1b3 [>64k:layout] Add SmallTypes & MediumTypes 2022-07-12 13:42:52 -06:00
Behdad Esfahbod 8a971d01e9 [layout] Use is_source_of instead of is_iterator 2022-07-08 12:01:48 -06:00
Behdad Esfahbod 0dc0da054d [iter] Add hb_is_sorted_iterator(_of) 2022-07-08 12:01:38 -06:00