src/hb-ot-layout-gsubgpos.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 9fea19eb 2023-07-08T13:56:24 [shape] Another always-inline
Behdad Esfahbod 5b45c56c 2023-07-08T13:47:41 [shape] Always-inline more Another 10% speedup in BM_Shape Gulzar-Regular.
Behdad Esfahbod bb9692e8 2023-07-08T13:45:48 [shape] Always-inline match_input 10% speedup in BM_Shape Gulzar-Regular.
Behdad Esfahbod 6c451054 2023-07-08T12:55:34 [sanitize] Sprinkle a few unlikely's
Behdad Esfahbod 4ecc62c2 2023-07-08T12:53:23 [sanitize] Simplify ChainRule::sanitize again check_struct does the same now.
Behdad Esfahbod fb02f4a8 2023-07-08T12:29:18 [sanitize] Micro-optimize ChainRule::sanitize
Behdad Esfahbod 403bc7ca 2023-07-07T20:17:32 [sanitize] Simplify Rule::sanitize()
Behdad Esfahbod 385896ff 2023-07-07T19:56:19 [sanitize] Speed up ChainRule::sanitize() 10% speedup in sanitizing Gulzar-Regular.
Behdad Esfahbod 2006d321 2023-07-07T17:07:11 [sanitize] Add "fastpath" for ArrayOfOffset16To<> objects with max size Unfortunately this doesn't speed up NotoNastaliq or Gulzar as I was hoping for. Their GSUB tables are not large enough for this to kick in...
Behdad Esfahbod 7a85663c 2023-07-07T19:21:18 Revert "[sanitize] Add "fastpath" for ArrayOfOffset16To<> objects with max size" This reverts commit 10f8556c73f3cf231c6b5a900a6a1903f9516f90. This was, unfortunately, wrong :(.
Behdad Esfahbod f2a3680f 2023-07-07T19:21:03 Revert "[gsubgpos] Limit (Chain)ContextFormat3 for consistency" This reverts commit 90b48917dadbef51bc5e90904d0f81e81199b9e2.
Behdad Esfahbod 90b48917 2023-07-07T18:50:01 [gsubgpos] Limit (Chain)ContextFormat3 for consistency
Behdad Esfahbod 10f8556c 2023-07-07T17:07:11 [sanitize] Add "fastpath" for ArrayOfOffset16To<> objects with max size
Behdad Esfahbod 68b78914 2023-07-07T17:07:11 [sanitize] Add "fastpath" for ArrayOfOffset16To<> objects with max size Unfortunately this doesn't speed up NotoNastaliq or Gulzar as I was hoping for. Their GSUB tables are not large enough for this to kick in...
Behdad Esfahbod 90752cd5 2023-07-07T15:47:28 [type] Add HeadlessArray16Of
Behdad Esfahbod 2d6091fc 2023-06-30T11:48:56 [GPOS] Make AnchorMatrix sanitize lazy again Was reverted in the previous commit, because it was incomplete.
Behdad Esfahbod 690af7aa 2023-06-30T10:36:01 [GPOS] Sanitize Device tables lazily This speeds up face loading for variable fonts by 80%! Comparing before to after Benchmark Time CPU Time Old Time New CPU Old CPU New --------------------------------------------------------------------------------------------------------------------------------------------------------------- BM_Font/load_face_and_shape/Roboto-Regular.ttf/hb -0.0368 -0.0366 20 20 20 19 BM_Font/load_face_and_shape/RobotoFlex-Variable.ttf/hb -0.7149 -0.7162 77 22 77 22 BM_Font/load_face_and_shape/RobotoFlex-Variable.ttf/var/hb -0.7241 -0.7255 80 22 79 22 BM_Font/load_face_and_shape/SourceSansPro-Regular.otf/hb -0.1441 -0.1445 28 24 28 24 BM_Font/load_face_and_shape/AdobeVFPrototype.otf/hb -0.7893 -0.7910 66 14 66 14 BM_Font/load_face_and_shape/AdobeVFPrototype.otf/var/hb -0.7865 -0.7882 67 14 66 14 BM_Font/load_face_and_shape/SourceSerifVariable-Roman.ttf/hb -0.8895 -0.8900 227 25 226 25 BM_Font/load_face_and_shape/SourceSerifVariable-Roman.ttf/var/hb -0.8895 -0.8900 226 25 225 25 BM_Font/load_face_and_shape/Comfortaa-Regular-new.ttf/hb -0.5512 -0.5531 42 19 42 19 BM_Font/load_face_and_shape/NotoNastaliqUrdu-Regular.ttf/hb -0.1511 -0.1510 227 192 225 191 BM_Font/load_face_and_shape/NotoSerifMyanmar-Regular.otf/hb -0.1494 -0.1498 41 35 40 34 OVERALL_GEOMEAN -0.6443 -0.6456 0 0 0 0
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 .