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
Garret Rieger
587969af42
[subset] Drop scripts that are not in the layout_scripts list.
2022-06-30 21:37:42 +00:00
Behdad Esfahbod
b96622d15c
[layout] Use a cache for main input ClassDef of (Chain)ContextLookupFormat2
...
This commit adds a per-lookup caching infrastructure to GSUB/GPOS, and
uses it to cache input ClassDef.get_class value for (Chain)ContextLookupFormat2.
For fonts heavy on use of heave class-based2 context matching, this shows
a good speedup. For NotoNastaliqUrdu for example, I observe 17% speedup.
Unfortunately not many other lookups can use a cache like this :(.
https://github.com/harfbuzz/harfbuzz/pull/3636
2022-06-07 09:14:38 -06:00
Behdad Esfahbod
e6409d3905
Revert "[layout] Use a cache for main input ClassDef of (Chain)ContextLookups"
...
This reverts commit 57d1c08739
.
Err. This was an accident.
2022-06-05 06:57:37 -06:00
Behdad Esfahbod
57d1c08739
[layout] Use a cache for main input ClassDef of (Chain)ContextLookups
2022-06-05 06:54:19 -06:00
Behdad Esfahbod
f13a79548f
[subset] Convert another use of hashmap to unique_ptr
2022-06-03 01:17:20 -06:00
Behdad Esfahbod
997d9cc466
[map] Make unique_ptr hashable
2022-06-02 18:47:42 -06:00
Behdad Esfahbod
5af5a56593
[VarStore] Implement writing 32bit var-store
...
Untested.
Finishes fixing https://github.com/harfbuzz/harfbuzz/issues/2965
2022-05-31 03:58:35 -06:00
Behdad Esfahbod
75112098ac
[VarStore] Implement reading 32bit var-store
...
Untested.
Part of https://github.com/harfbuzz/harfbuzz/issues/2965
Serializing is incomplete.
2022-05-31 03:58:29 -06:00
Behdad Esfahbod
e5d6da7905
[varStore] rename shortCount to wordCount
2022-05-30 07:48:58 -06:00
Behdad Esfahbod
371e14d99c
Combine uses of map has() then get() with has(.., &..)
2022-05-28 13:40:30 -06:00
Behdad Esfahbod
6010feeeb5
[varStore] Rename variable as per review
...
https://github.com/harfbuzz/harfbuzz/pull/3605
2022-05-24 09:01:02 -06:00
Behdad Esfahbod
d9acc045f1
[VarStore] Sprinkle cache_t type around
...
It's available so no need to use void*.
2022-05-21 15:12:14 -06:00
Behdad Esfahbod
da38312e42
[VarStore] Pepper cache with likely()
2022-05-21 15:12:14 -06:00
Behdad Esfahbod
cf8f00e354
[VarStore] Don't use NAN
...
Is faster.
With this, I'm seeing 25 to 28% speedup in glyph_h_advances benchmark
of benchmark-font for var/hb tests.
2022-05-21 15:12:14 -06:00
Behdad Esfahbod
880f50f7e4
Refactor varstore cache
2022-05-21 15:12:14 -06:00
Behdad Esfahbod
f2a2fb91a3
[GPOS] Cache VarStore region scalars
2022-05-21 15:12:14 -06:00