Commit Graph

317 Commits

Author SHA1 Message Date
Behdad Esfahbod 630b874ae6 [gsubgpos] Add a cache to intersected_class_glyphs
30% gain on subset_codepoints/NotoNastaliqUrdu-Regular.ttf/nohinting/1400.
2022-12-03 12:13:15 -07:00
Behdad Esfahbod c044f4af3e [gsubgpos] Remove wrong const 2022-12-03 11:58:04 -07:00
Behdad Esfahbod 2680be1f22 [gsubgpos] Don't set unnecessary funcs 2022-12-03 11:54:52 -07:00
Behdad Esfahbod ac8b232a2d [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
2022-11-30 17:09:04 -07:00
Behdad Esfahbod c6a4b60116 [gsubgpos] Add an unlikely 2022-11-30 15:02:42 -07:00
Behdad Esfahbod a4a4078632
Merge pull request #3893 from googlefonts/preprocess_test
[subset] Fix testing of preprocess
2022-11-24 11:56:58 -07:00
Behdad Esfahbod 0c70bc7f32 [skippy-iter] Fix two logic errors
First, a signed underflow.

Second, a wrong condition.

Both were introduced in 42681bdb55
2022-11-24 11:48:48 -07:00
Behdad Esfahbod 1fa64c0c23 [gsubgpos] Conditionalize skippy on unsafe-to-concat 2022-11-23 21:38:51 -07:00
Behdad Esfahbod 42681bdb55 [gsubgpos] No logic-change minor rewrite 2022-11-23 21:36:43 -07:00
Behdad Esfahbod c15efdec49 [gsubgpos] Comment 2022-11-23 21:14:28 -07:00
Behdad Esfahbod 7ec1c41a55 [gsubgpos] Skippy-iter: Prefer correctness to performance
Prefer unsafe-to-concat correctness, over performance.
2022-11-23 21:12:41 -07:00
Garret Rieger ff3cac0ccd [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.
2022-11-23 23:50:49 +00:00
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