src/hb-ot-layout-gsubgpos.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 9df07c3c 2023-06-08T11:46:06 [gsubgpos] Prevent a leak in closure If the push wasn't successful we were constructing an hb_set_t on the Crap data... At least that's my reading of the code.
Behdad Esfahbod 82741304 2023-06-04T09:41:41 [subset] start_embed never returns nullptr Remove checks.
Behdad Esfahbod 31949636 2023-05-04T16:29:48 Revert "[layout] Cache subtable coverages in hb_map_t" This reverts commit 7a715d74e06720c17d28ba7b4c3da0b583f8d1d3.
Behdad Esfahbod 7a715d74 2023-05-04T16:28:11 [layout] Cache subtable coverages in hb_map_t Proof-of-concept. Going to revert. Memory consumption is more than I like. It does speed up Roboto shaping another 15% though. Perhaps if we could add logic to choose which subtables to cache, this might be a useful approach.
Behdad Esfahbod 975980d3 2023-05-04T15:56:06 [gsubgpos] Add apply_cached() as separate method In prep for some other work.
Behdad Esfahbod 3f2401e2 2023-05-03T16:56:52 [layout] Don't init iters successively multiple times
Behdad Esfahbod 959f1634 2023-05-03T16:27:41 [gsubgpos] Minor reduce variable scope
Behdad Esfahbod fb795dc3 2023-05-03T15:17:20 [GPOS] Optimize iterator reset Speeds up Gulzar shaping 5%.
Behdad Esfahbod 8a8fc37c 2023-05-03T14:57:00 [GDEF] Use a cache for glyph classes Shows 5% speedup for Roboto shaping.
Behdad Esfahbod 49ac5e11 2023-05-02T12:12:26 [match_input] Micro-optimize
Behdad Esfahbod 63afb4f2 2023-04-26T10:29:25 [syllabic] Better fix for previous issue With previous fix the GPOS application was still reading the syllable() member, which was already freed. This fix is more correct.
Qunxin Liu 125450d2 2023-03-13T15:43:29 [subset] collect name_ids for FeratureParams
Behdad Esfahbod 8708b9e0 2023-02-06T14:51:25 [GPOS] Avoid O(n^2) behavior in mark-attachment Better implementation; avoids arbitrary limit on look-back.
Behdad Esfahbod 661050b4 2023-02-06T12:38:17 Revert "[layout] Limit how far we skip when looking back" This reverts commit 85be877925ddbf34f74a1229f3ca1716bb6170dc.
Behdad Esfahbod b29fbd16 2023-02-06T13:08:52 [gsubgpos] Refactor skippy_iter.match()
Behdad Esfahbod 85be8779 2023-02-01T20:00:43 [layout] Limit how far we skip when looking back See comments.
Behdad Esfahbod d18fd3f7 2023-01-31T16:28:49 [layout] Comment
Behdad Esfahbod 7a4bd97e 2023-01-31T14:59:39 [layout] Build lookup accelerators lazily on-demand Reduces memory consumption for large multi-script fonts drastically.
Behdad Esfahbod 83353f13 2023-01-31T14:32:14 [layout] Reduce memory use slightly By using raw pointer instead of vector for subtable accelerator. To be used for more memory saving by making subtable accelerators lazy-loaded by shape-plans for large fonts.
Behdad Esfahbod 49d75ef3 2023-01-27T15:37:11 [gsubgpos] Fix bug in cached ChainContextFormat2 application
Behdad Esfahbod d2279a20 2023-01-27T12:32:55 [gsubgpos] Avoid a copy into the vector
Behdad Esfahbod 8d29be39 2023-01-26T11:41:58 [gsubgpos] Minor drop an unnecessary hb_iter
Behdad Esfahbod be8a87c4 2023-01-21T15:00:41 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.
Garret Rieger ea1ee0d4 2023-01-14T00:23:53 [instance] drop and don't collect lookups from feature variations when fully instancing. This previously incorrectly collected lookups that could be reached via feature variations that are dropped and not activated by the current instance position.
Behdad Esfahbod ed023f66 2023-01-12T17:04:24 Enable -Wformat-signedness And fix the codebase.
Behdad Esfahbod 1a00ab69 2023-01-11T10:56:16 [subset-plan] Simplify gsub_lookups and gpos_lookups allocation
Behdad Esfahbod 2764a616 2023-01-05T15:14:54 Revert "[gsubgpos] Use swap instead of move" This reverts commit 8a17cc4ecf21f6754e2d90562d0ced7496870f74.
Behdad Esfahbod 167b7c60 2023-01-05T14:48:20 Revert "[gsubgpos] Reduce hb_set_t allocations" This reverts commit 0b7f6d6cf0e2deba637783ab3880fdfb90ca8ac3. Not much benefit as the main allocations come from other places.
Behdad Esfahbod 3947cedd 2023-01-05T14:47:47 Revert "[gsubgpos] Cache pos_glyphs allocation in closure" This reverts commit 3961cc46bf438947b19063cb7e735247358f1d4f. This was wrong...
Behdad Esfahbod 8a17cc4e 2023-01-05T14:15:38 [gsubgpos] Use swap instead of move Move is wrong when we want to reuse the object.
Behdad Esfahbod 4401dd24 2023-01-05T14:13:57 [gsubgpos] Minor use ->clear() directly
Behdad Esfahbod 0b7f6d6c 2023-01-05T13:58:57 [gsubgpos] Reduce hb_set_t allocations
Behdad Esfahbod 3961cc46 2023-01-05T13:58:57 [gsubgpos] Cache pos_glyphs allocation in closure Saves some 3% in Gulzar-Regular subsetting.
Behdad Esfahbod a90f149e 2023-01-05T13:52:11 [gsubgpos] Minor drop an allocation
Behdad Esfahbod 2eacc37e 2022-12-31T12:27:13 [vector] Add internal API for exact-size allocation Use it from a couple of places.
Behdad Esfahbod 36bef5dc 2022-12-30T13:17:23 [gsubgpos] Prealloc subtables vector
Behdad Esfahbod 630b874a 2022-12-03T12:13:15 [gsubgpos] Add a cache to intersected_class_glyphs 30% gain on subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/1400.
Behdad Esfahbod c044f4af 2022-12-03T11:58:04 [gsubgpos] Remove wrong const
Behdad Esfahbod 2680be1f 2022-12-03T11:53:14 [gsubgpos] Don't set unnecessary funcs
Behdad Esfahbod ac8b232a 2022-11-30T16:42:15 [gsub] Cache intersects_class results for closure Benchmark Time CPU Time Old Time New CPU Old CPU New ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/10 +0.0246 +0.0240 0 0 0 0 BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/64 -0.5541 -0.5544 4 2 4 2 BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/512 -0.1120 -0.1123 43 38 43 38 BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/1400 -0.1154 -0.1159 43 38 43 38
Behdad Esfahbod c6a4b601 2022-11-30T14:09:59 [gsubgpos] Add an unlikely
Behdad Esfahbod a4a40786 2022-11-24T11:56:58 Merge pull request #3893 from googlefonts/preprocess_test [subset] Fix testing of preprocess
Behdad Esfahbod 0c70bc7f 2022-11-24T11:48:48 [skippy-iter] Fix two logic errors First, a signed underflow. Second, a wrong condition. Both were introduced in 42681bdb55a75520d4ac194302fe936d1ce3cb34
Behdad Esfahbod 1fa64c0c 2022-11-23T21:38:51 [gsubgpos] Conditionalize skippy on unsafe-to-concat
Behdad Esfahbod 42681bdb 2022-11-23T21:36:43 [gsubgpos] No logic-change minor rewrite
Behdad Esfahbod c15efdec 2022-11-23T21:14:28 [gsubgpos] Comment
Behdad Esfahbod 7ec1c41a 2022-11-23T21:12:41 [gsubgpos] Skippy-iter: Prefer correctness to performance Prefer unsafe-to-concat correctness, over performance.
Garret Rieger ff3cac0c 2022-11-23T23:50:49 [subset] Fix unecessary trailing 0 bytes left by ContextFormat2 pruning. Uneeded rules where beind removed from the count by the bytes for them was being left in the font.
Behdad Esfahbod 01f961ac 2022-11-18T15:47:17 [gsubgpos] Minor call hb_iter() instead of ->iter() directly
Behdad Esfahbod bba57655 2022-11-18T14:52:17 [gsubgpos] Remove a few unnecessary namespace invocations
Behdad Esfahbod b4d0d160 2022-11-18T14:47:33 [gsubgpos] Rewrite a couple apply() functions as daggers
Behdad Esfahbod 76c8214e 2022-11-18T12:30:46 [gsubgpos] Move member around
Behdad Esfahbod 1610008e 2022-11-16T20:02:36 [gsubgpos] Minor remove call to hb_iter
Behdad Esfahbod 19ec01d2 2022-11-16T19:14:42 [gsubgpos] Sprinkle const around
Behdad Esfahbod 8b2a2111 2022-11-16T16:57:44 [layout] Keep digest updated in the context Don't recompute digest after every (applied) GSUB lookup.
Behdad Esfahbod 15b6c325 2022-11-16T15:59:13 [layout] Use a buffer digest for GPOS to skip whole lookups
Behdad Esfahbod a053b84c 2022-11-16T14:39:25 [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.
Qunxin Liu f4813e3b 2022-09-09T10:34:09 [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.
Qunxin Liu 64e2f2fc 2022-09-09T09:36:19 [instance] store active featurevariation record/condition idxes in the plan
Qunxin Liu a3e6dbbb 2022-09-02T13:53:10 [subset] skip the script if it's not included in the final subset
Garret Rieger 8d611a7f 2022-07-22T22:49:40 [repacker] remove temporary visibility overrides in gsubgpos.
Garret Rieger b1d38a6d 2022-07-19T23:33:16 [repack] WIP implement extension promotion mechanism.
Garret Rieger 3f7a74ff 2022-07-19T21:50:13 [repacker] WIP extension promotion implementation.
Behdad Esfahbod 94de3280 2022-07-24T18:51:55 [GSUB/GPOS] Adjust buffer message
Behdad Esfahbod bc80e4b9 2022-07-24T18:48:38 [GSUB/GPOS] More buffer message for contextuals Fixes https://github.com/harfbuzz/harfbuzz/issues/3753
Behdad Esfahbod 5a9c7930 2022-07-22T21:33:15 Add HB_NO_BEYOND_64K
Behdad Esfahbod 00dfbbce 2022-07-21T11:39:32 [Coverage] Rename and templatize intersected_coverage_glyphs
Behdad Esfahbod 6826b2c3 2022-07-20T13:25:34 [gsubgpos/closure] Minor condition use bool operator
Behdad Esfahbod 1665cf6b 2022-07-19T13:56:23 [>64k:layout] Split GDEFVersion1 https://github.com/be-fonts/boring-expansion-spec/issues/36
Behdad Esfahbod 99f017f4 2022-07-11T13:13:19 [>64k:layout:GSUBGPOS] Implement format 2 Implements https://github.com/be-fonts/boring-expansion-spec/issues/58 Subset does NOT lower format.
Behdad Esfahbod 9ef9fc01 2022-07-11T13:29:23 [>64k:layout] Templatize GSUBGPOSFormat1
Behdad Esfahbod 5fd0a3f0 2022-07-11T13:10:04 [>64k:layout] Templatize GSUBGPOSFormat1
Behdad Esfahbod 6d0e3e67 2022-07-11T12:28:53 [>64k:layout] Split GSUBGPOSVersion1 into own struct
Behdad Esfahbod 04c5cd40 2022-07-11T11:39:41 [subset/layout] Move find_duplicate_features to subset from layout
Behdad Esfahbod 1bf8fa2f 2022-07-08T14:22:21 [>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.
Behdad Esfahbod 0f13eb1f 2022-07-08T13:43:33 [>64k:layout] Templatize (Chain)ContextFormat1
Behdad Esfahbod d1f58e59 2022-07-08T13:25:07 [>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.
Behdad Esfahbod a90c5af9 2022-07-08T13:11:47 [>64k:layout] Templatize (Chain)ContextFormat2
Behdad Esfahbod 9d0e9faa 2022-07-06T17:49:07 [>64k:layout] Templatable bunch of GSUBGPOS internal functions
Behdad Esfahbod 429b387a 2022-07-06T17:37:11 [>64k:layout] Support HBUINT24 in skippy_iter
Behdad Esfahbod 1ef67a6d 2022-07-06T17:28:02 [gsubgpos] Remove HBUINT16 from matcher
Behdad Esfahbod 6d051f40 2022-07-08T14:08:51 [layout] Simplify StructAfter<> usage
Behdad Esfahbod 5192294f 2022-07-08T14:00:24 .
Behdad Esfahbod 8b349e11 2022-07-06T17:22:34 [gsubgpos] Remove HBUINT16 from match functions signatures
Behdad Esfahbod f114b18c 2022-07-06T17:31:46 [gsubgpos] Break skippy_iter set_match_func into two
Behdad Esfahbod 4119f73c 2022-06-08T06:34:48 [subset/layout] Rename dispatch_closure_lookups_recurse_func to dispatch_recurse_func<>
Behdad Esfahbod 21346af0 2022-06-07T14:41:39 [layout-cache] Adjust cost-function for recent change
Behdad Esfahbod bfee6839 2022-06-07T11:41:05 [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
Behdad Esfahbod 39820af7 2022-06-07T10:18:38 [layout] Add HB_NO_OT_LAYOUT_LOOKUP_CACHE to disable caching lookups Enabled when optimize-size profile is enabled.
Behdad Esfahbod c8fb048f 2022-06-07T09:20:27 [gsubgpos] Document caching
Behdad Esfahbod 5963cf44 2022-06-07T09:12:45 [gsubgpos] Merge cache_enter and cache_leave entry points Saves a pointer per subtable
Behdad Esfahbod d4c09e9a 2022-06-07T09:03:30 [gsubgpos] Remove apply_cached() entry point Just use a bool to apply()
Behdad Esfahbod b96622d1 2022-06-05T02:45:41 [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
Behdad Esfahbod e6409d39 2022-06-05T06:57:37 Revert "[layout] Use a cache for main input ClassDef of (Chain)ContextLookups" This reverts commit 57d1c08739d0acd94b96da2f9d5dd6c0ff3b3722. Err. This was an accident.
Behdad Esfahbod 57d1c087 2022-06-05T02:45:41 [layout] Use a cache for main input ClassDef of (Chain)ContextLookups
Behdad Esfahbod f9b643f6 2022-06-04T07:29:40 [layout] s/hb_get_subtables_context_t/hb_accelerate_subtables_context_t/g
Behdad Esfahbod a42c624f 2022-06-03T01:22:34 Convert one final use of hashmap to unique_ptr
Behdad Esfahbod f13a7954 2022-06-03T01:17:20 [subset] Convert another use of hashmap to unique_ptr
Behdad Esfahbod 997d9cc4 2022-06-02T18:04:12 [map] Make unique_ptr hashable
Behdad Esfahbod bca710e8 2022-06-02T12:06:25 [gsubgpos] Use map has() instead of get() when appropriate