Behdad Esfahbod
01f961ac3a
[gsubgpos] Minor call hb_iter() instead of ->iter() directly
2022-11-18 15:47:17 -07:00
Behdad Esfahbod
bba5765583
[gsubgpos] Remove a few unnecessary namespace invocations
2022-11-18 14:52:17 -07:00
Behdad Esfahbod
b4d0d1608d
[gsubgpos] Rewrite a couple apply() functions as daggers
2022-11-18 14:47:33 -07:00
Behdad Esfahbod
76c8214eb5
[gsubgpos] Move member around
2022-11-18 12:30:46 -07:00
Behdad Esfahbod
1610008e62
[gsubgpos] Minor remove call to hb_iter
2022-11-16 20:02:36 -07:00
Behdad Esfahbod
19ec01d25c
[gsubgpos] Sprinkle const around
2022-11-16 19:14:42 -07:00
Behdad Esfahbod
8b2a211123
[layout] Keep digest updated in the context
...
Don't recompute digest after every (applied) GSUB lookup.
2022-11-16 16:57:44 -07:00
Behdad Esfahbod
15b6c32599
[layout] Use a buffer digest for GPOS to skip whole lookups
2022-11-16 16:11:36 -07:00
Behdad Esfahbod
a053b84cb9
[gsubgpos] Optimize set-digest initialization
...
Previously we were once collecting set-digest for each subtable,
and another time for each lookup.
Now we compute the one for each lookup simply from the ones for
its subtables.
2022-11-16 14:39:25 -07: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
a3e6dbbb43
[subset] skip the script if it's not included in the final subset
2022-09-06 11:29:34 -06:00
Garret Rieger
8d611a7fd0
[repacker] remove temporary visibility overrides in gsubgpos.
2022-07-26 12:22:17 -06:00
Garret Rieger
b1d38a6d0b
[repack] WIP implement extension promotion mechanism.
2022-07-26 12:22:17 -06:00
Garret Rieger
3f7a74ff40
[repacker] WIP extension promotion implementation.
2022-07-26 12:22:17 -06:00
Behdad Esfahbod
94de328011
[GSUB/GPOS] Adjust buffer message
2022-07-24 18:51:55 -06:00
Behdad Esfahbod
bc80e4b923
[GSUB/GPOS] More buffer message for contextuals
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3753
2022-07-24 18:50:14 -06:00
Behdad Esfahbod
5a9c7930ef
Add HB_NO_BEYOND_64K
2022-07-22 21:33:31 -06:00
Behdad Esfahbod
00dfbbce1c
[Coverage] Rename and templatize intersected_coverage_glyphs
2022-07-21 11:45:05 -06:00
Behdad Esfahbod
6826b2c3fd
[gsubgpos/closure] Minor condition use bool operator
2022-07-20 13:25:34 -06:00
Behdad Esfahbod
1665cf6bc4
[>64k:layout] Split GDEFVersion1
...
https://github.com/be-fonts/boring-expansion-spec/issues/36
2022-07-19 14:21:48 -06:00
Behdad Esfahbod
99f017f41d
[>64k:layout:GSUBGPOS] Implement format 2
...
Implements https://github.com/be-fonts/boring-expansion-spec/issues/58
Subset does NOT lower format.
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
6d0e3e677b
[>64k:layout] Split GSUBGPOSVersion1 into own struct
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
04c5cd4085
[subset/layout] Move find_duplicate_features to subset from layout
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
1bf8fa2f1f
[>64k:layout:(Chain)Context] Implement format 4
...
Implements rest of https://github.com/be-fonts/boring-expansion-spec/issues/34
Subset does NOT lower format.
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
0f13eb1f5c
[>64k:layout] Templatize (Chain)ContextFormat1
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
d1f58e5979
[>64k:layout:(Chain)Context] Implement format 5
...
Implements part of https://github.com/be-fonts/boring-expansion-spec/issues/34
Subset does NOT lower format.
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
a90c5af9d2
[>64k:layout] Templatize (Chain)ContextFormat2
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
9d0e9faa43
[>64k:layout] Templatable bunch of GSUBGPOS internal functions
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
429b387a6f
[>64k:layout] Support HBUINT24 in skippy_iter
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
1ef67a6d66
[gsubgpos] Remove HBUINT16 from matcher
2022-07-12 13:42:52 -06:00
Behdad Esfahbod
6d051f4018
[layout] Simplify StructAfter<> usage
2022-07-08 14:09:04 -06:00
Behdad Esfahbod
5192294f83
.
2022-07-08 14:09:04 -06:00
Behdad Esfahbod
8b349e1139
[gsubgpos] Remove HBUINT16 from match functions signatures
2022-07-08 12:05:01 -06:00
Behdad Esfahbod
f114b18c58
[gsubgpos] Break skippy_iter set_match_func into two
2022-07-08 12:04:14 -06:00
Behdad Esfahbod
4119f73c21
[subset/layout] Rename dispatch_closure_lookups_recurse_func to dispatch_recurse_func<>
2022-06-08 18:42:09 +01:00
Behdad Esfahbod
21346af01d
[layout-cache] Adjust cost-function for recent change
2022-06-07 14:41:39 -06:00
Behdad Esfahbod
bfee6839b0
[layout-cache] Cache lookahead, not input, classdef in ChainContextFormat2
...
From the commit:
+ /* For ChainContextFormat2 we cache the LookaheadClassDef instead of InputClassDef.
+ * The reason is that most heavy fonts want to identify a glyph in context and apply
+ * a lookup to it. In this scenario, the length of the input sequence is one, whereas
+ * the lookahead / backtrack are typically longer. The one glyph in input sequence is
+ * looked-up below and no input glyph is looked up in individual rules, whereas the
+ * lookahead and backtrack glyphs are tried. Since we match lookahead before backtrack,
+ * we should cache lookahead. This decisions showed a 20% improvement in shaping of
+ * the Gulzar font.
https://github.com/harfbuzz/harfbuzz/pull/3636
2022-06-07 11:41:05 -06:00
Behdad Esfahbod
39820af72f
[layout] Add HB_NO_OT_LAYOUT_LOOKUP_CACHE to disable caching lookups
...
Enabled when optimize-size profile is enabled.
2022-06-07 10:27:55 -06:00
Behdad Esfahbod
c8fb048f79
[gsubgpos] Document caching
2022-06-07 09:20:27 -06:00
Behdad Esfahbod
5963cf4469
[gsubgpos] Merge cache_enter and cache_leave entry points
...
Saves a pointer per subtable
2022-06-07 09:17:14 -06:00
Behdad Esfahbod
d4c09e9a87
[gsubgpos] Remove apply_cached() entry point
...
Just use a bool to apply()
2022-06-07 09:17:14 -06: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
f9b643f6b2
[layout] s/hb_get_subtables_context_t/hb_accelerate_subtables_context_t/g
2022-06-04 09:27:31 -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