Commit Graph

351 Commits

Author SHA1 Message Date
Qunxin Liu 125450d2f2 [subset] collect name_ids for FeratureParams 2023-03-13 15:43:29 -07:00
Behdad Esfahbod 0f33ea8c4f [subset/COLR] Copy VarStore
Fixes https://github.com/harfbuzz/harfbuzz/issues/4085
2023-01-27 11:26:57 -07:00
Behdad Esfahbod 2fede3ef4a [layout] Fix a return_trace 2023-01-26 12:56:17 -07:00
Behdad Esfahbod be8a87c453 Move TRACE_DISPATCH after may_recurse()
Such that we don't get memory access issues if DEBUG_SANITIZE is
on and may_recurse() returns false.
2023-01-21 15:50:25 -07:00
Behdad Esfahbod 65d3db375c [subset-plan] Simplify user_axes_location allocation 2023-01-11 12:36:54 -07:00
Behdad Esfahbod 60418fcb95 [subset-plan] Simplify axes_index_map allocation 2023-01-11 12:33:25 -07:00
Behdad Esfahbod b2007abff7 [subset-plan] Simplify glyph_map_gsub allocation 2023-01-11 11:27:22 -07:00
Behdad Esfahbod 9e24873c1e [subset-plan] Simplify gsub/gpos_feature_substitutes_map allocation 2023-01-11 11:12:07 -07:00
Behdad Esfahbod 01208c7c02 [subset-plan] Simplify gsub/gpos_feature_record_cond_idx_map allocation 2023-01-11 11:10:28 -07:00
Behdad Esfahbod 06039db080 [subset-plan] Simplify gsub_langsys and gpos_langsys allocation 2023-01-11 11:07:31 -07:00
Behdad Esfahbod 1a00ab69ec [subset-plan] Simplify gsub_lookups and gpos_lookups allocation 2023-01-11 10:56:16 -07:00
Behdad Esfahbod 1a716bad03 [subset-plan] Simplify gsub_features and gpos_features allocation 2023-01-11 10:51:48 -07:00
Behdad Esfahbod 4de66eec57 [subset-plan] Simplify layout_scripts allocation 2023-01-11 10:40:54 -07:00
Behdad Esfahbod c8486b6301 [open-type] Add to_int to fixed types
To make sure we don't accidentally forget to_float().
As we did recently in COLRv1 code.
2023-01-07 14:15:17 -07:00
Behdad Esfahbod ae208963df Add hb-limits.hh 2022-12-26 12:30:39 -07:00
Behdad Esfahbod 300d82ce2e Fix compiler warning 2022-12-13 11:01:03 -07:00
Behdad Esfahbod 9a3f0be291 [COLR] Apply variations in get_extent 2022-12-11 13:40:53 -07:00
Behdad Esfahbod 22b0390e2d Revert "[VarData] Don't clear memory we are going to fill in completely"
This reverts commit e28e2dad03.

This made fuzzer unhappy. I'm not sure how.

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54044
2022-12-05 09:43:36 -07:00
Behdad Esfahbod e28e2dad03 [VarData] Don't clear memory we are going to fill in completely 2022-12-03 15:56:43 -07:00
Behdad Esfahbod 0e13b4abbc [VarData] Optimize main loop slightly 2022-12-03 15:50:24 -07:00
Behdad Esfahbod ad17c0acce [VarData] Whitespace 2022-12-03 14:56:57 -07:00
Behdad Esfahbod e7eb445d29 [VarData] Optimize longWord calculation 2022-12-03 14:56:00 -07:00
Behdad Esfahbod f2c980be29 [VarData] Optimize wordCount calculation
6% speedup in RobotoFlex-Variable/900 benchmark.
2022-12-03 14:49:38 -07:00
Behdad Esfahbod 3641b0e01e [VarData] Optimize serialize() 2022-12-03 14:26:21 -07:00
Behdad Esfahbod e155f12307 [VarData] Minor save a variable 2022-12-03 14:14:39 -07:00
Behdad Esfahbod 5596a73087 [layout] Speed up ClassDefFormat2 intersects 2022-12-03 13:33:48 -07:00
Behdad Esfahbod 85e7263b38 [VariationStore] Minor access array directly 2022-12-03 13:28:02 -07:00
Behdad Esfahbod 58e9df132f [Device] Serialize VariationDevice zerocopy 2022-12-03 13:04:00 -07:00
Behdad Esfahbod 44a5de3a97 [Device] Save a snap/revert 2022-12-03 12:50:32 -07:00
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