src/OT/Layout


Log

Author Commit Date CI Message
Behdad Esfahbod 89e28a23 2025-05-10T16:30:35 [skippy-iter] Use auto for type deduction
Behdad Esfahbod 59334682 2025-04-23T20:56:32 [shape] Only apply slant to shaping results if horizontal
Behdad Esfahbod 7f5fafec 2025-04-01T21:35:28 [GDEF] Simplify cache declaration
Qunxin Liu 5ebe36e1 2025-03-27T13:09:18 [subset] bug fix for CaretValueFormat3 Don't return false in case of a Hinting Device table
Qunxin Liu 192d264a 2025-03-25T13:32:01 [subset] remove divisions when computing the cost of binary search
Behdad Esfahbod b8327fe6 2025-02-06T20:01:12 Fix compiler errors
Behdad Esfahbod c7378294 2025-02-06T01:42:25 [OT] Remove likely() from coverage check Not that it matters, but because of the set-digest, this path is not very likely() anymore.
Behdad Esfahbod cad264b2 2025-02-06T00:56:16 Indent
Behdad Esfahbod 69057e6e 2025-02-05T19:50:38 [Ligature] Cache coverage the same way as PairPos1 Another 7% down on Roboto-Regular.
Behdad Esfahbod 7a746c32 2025-02-05T19:38:25 [Coverage] Fix cache cost reporting
Behdad Esfahbod 5be62a9f 2025-02-05T19:30:01 [PairPosFormat1] Use a coverage cache as well Speeds up Arial shaping by 3%.
Behdad Esfahbod f22943a2 2025-02-05T18:51:11 [PairPos] Cache coverage as well Another 3% down in Roboto-Regular.
Behdad Esfahbod 726af2e4 2025-02-05T18:10:40 [PairPos] Use a class cache 10% speedup on Roboto-Regular. 5% on SF Pro.
Behdad Esfahbod 48774052 2024-09-22T13:00:09 [GDEF] Sprinkle some hb_barrier()s
Behdad Esfahbod 0dace9f3 2024-09-21T12:38:16 [PairPos] Forgo an optimization for the sake of compatibility Fixes https://github.com/harfbuzz/harfbuzz/issues/4797
Behdad Esfahbod ba1f194a 2024-05-02T12:18:11 [gsubgpos] Reduce stack use in recursion
Qunxin Liu c04d0a29 2024-04-25T14:57:36 [subset] generate colrv1 varsotre inner_maps in the plan Also merge remap_variation_indices APIs used by GDEF and BASE into 1
Garret Rieger 992953fd 2024-03-28T23:12:21 [subset] updated comment.
Garret Rieger 96f0038e 2024-03-28T23:11:16 [subset] cast.
Garret Rieger 6e874817 2024-03-27T17:47:57 [subset] add virtual links to keep the gdef varstore last.
Garret Rieger 71456071 2024-03-25T21:41:16 [subset] place the gdef var store at the end of the GDEF table. It appears that some font processors assume it is the last sub table.
Behdad Esfahbod 1cb47eff 2024-02-06T14:49:31 Rename VariationStore to ItemVariationStore
Garret Rieger ef1f5c4e 2024-01-08T22:17:55 [subset] Re-use common Coverage subsetting function in PairPosFormat2. Was using an identical but less efficient version. Fixes fuzzer test case: https://oss-fuzz.com/testcase-detail/6151390002806784
Qunxin Liu 2d001a0a 2023-11-08T11:11:51 [subset] OTS doesn't allow ligature attachment offset to be 0
Behdad Esfahbod d10cc79a 2023-11-06T10:41:30 Move a couple of barriers
Behdad Esfahbod 3a9262cc 2023-11-04T12:52:46 [sanitize] More hb_barrier() annotations
Behdad Esfahbod 30672c7e 2023-11-03T18:52:03 Add hb_barrier() And annotate some more.
Behdad Esfahbod 775320a4 2023-11-03T18:38:12 [sanitize] Add barriers to runtime-checked values
Qunxin Liu f05636e1 2023-11-02T09:18:15 [instancer] fix build issue after rebase
Qunxin Liu 6c017a11 2023-11-01T09:54:46 [instancer] SinglePos/PairPos: do not strip_hints for partial instancing
Qunxin Liu 413af0a9 2023-11-02T11:14:48 [instancer] When partial instancing, subset LigCaretList after VarStore instantiation
Behdad Esfahbod 2804127a 2023-10-31T15:12:55 [Value] Typed offsets
Behdad Esfahbod 38546acd 2023-10-31T14:56:09 [typed-offset] Fix sanitize()
Behdad Esfahbod 62117801 2023-10-31T14:50:45 [AnchorMatrix] Annotate offset base type
Behdad Esfahbod 4f219385 2023-10-31T14:33:23 [CursivePosFormat1] Use typed offsets for EntryExitRecord
Behdad Esfahbod b37cc61d 2023-10-31T14:26:42 Add base types to OffsetTo<> Unused so far.
Behdad Esfahbod 9fc45f70 2023-10-05T14:06:39 [ReverseChainSingleSubst] Minor optimization
Qunxin Liu 8ceed6ee 2023-10-18T15:43:40 [subset] fix Lookup.MarkFilteringSet to use the new indices
Qunxin Liu 510456e9 2023-10-18T14:26:11 [subset] don't retain empty coverage in MarkGlyphSetsDef
Qunxin Liu 16ee24c0 2023-10-18T12:43:36 [subset] bug fix for GDEF don't use embed(this), snapshot and revert to lower version if needed
Qunxin Liu 8585d600 2023-10-17T14:30:17 [instancer] update variable device flags in ValueFormat
Behdad Esfahbod fc563bb4 2023-10-05T11:07:17 Merge pull request #4421 from googlefonts/GDEF_GPOS [instancer] support GDEF/GPOS tables
Garret Rieger 333946b0 2023-09-28T19:02:37 [subset] Fix fuzzer timeout. Fixes https://oss-fuzz.com/testcase-detail/5458896606855168. Limit iteration over coverage in MarkLigPosFormat1 subsetting to the number of glyphs in the liga array.
Qunxin Liu f39e9bf1 2023-09-25T08:59:11 [instancer] instantiate GPOS Just need to update var_idxes and deltas
Qunxin Liu c8594baa 2023-09-21T11:45:01 [instancer] instantiate GDEF varStore And update layout var idxes accordingly
Qunxin Liu 77f24d82 2023-09-22T14:47:11 [instancer] remap layout var_idxes code update make hb_collect_variation_indices_context_t only collect layout variation indices.
Bruce Mitchener f380a328 2023-08-25T14:01:01 Fix some typos.
Behdad Esfahbod 483d4a87 2023-08-06T14:40:45 Fix bot
Behdad Esfahbod 7989702a 2023-08-06T14:17:50 Audit and fix up serialize_subset uses Fixes https://github.com/harfbuzz/harfbuzz/issues/4362
Behdad Esfahbod dcd3afca 2023-08-01T20:09:34 [skippy-iter] Remove unused num_items
Behdad Esfahbod 9cdc043c 2023-07-31T18:53:29 [Cursive] Only sanitize what we use
Behdad Esfahbod 44026aa8 2023-07-31T16:47:06 [Cursive] Minor, adjust unsafe-to-concat if prev didn't sanitize
Behdad Esfahbod b382e616 2023-07-31T16:29:28 [GPOS] Sanitize Cursive positioning anchors lazily Speeds up Duployan-Regular.otf load time by 30%. Doesn't seem to slow down shaping in a measurable way.
Behdad Esfahbod 62e6f783 2023-07-25T08:32:21 [Cursive] round
Behdad Esfahbod 60db1427 2023-07-24T20:49:32 [layout] Remove unused "max-size" cruft
Behdad Esfahbod c91899be 2023-07-21T11:43:47 [gdef] Use set-digest for mark-filterint-sets Speeds up Noto Duployan-Regular.otf by 45% percent!
Behdad Esfahbod 837885f0 2023-07-20T12:58:16 Revert "[sanitize/Coverage] Keep a map of sane coverages" This reverts commit a689114898cc3e8f1c6ba7cc49cd6c3639d91250.
Behdad Esfahbod 0ab90671 2023-07-20T12:57:16 [sanitize/Coverage] Keep a map of sane coverages Fonts like Gulzar reuse the same coverage over a thousand times sometimes. However, this doesn't speed up sanitize unfortunately. Looks like calling Coverage::sanitize() is already very fast. We're just doing A LOT of it. The map slowed it down in fact. A set was even slower. Going to revert.
Behdad Esfahbod aa381ae9 2023-07-18T10:42:13 [ReverseChain] Remove SIZE_MAX Oops. Can't set it since the struct has offsets.
Behdad Esfahbod e583c9e9 2023-07-18T10:34:26 [ReverseChain] Add max-size
Behdad Esfahbod 49730531 2023-07-16T13:09:49 Config
Behdad Esfahbod 645fabd1 2023-07-16T11:36:59 [gsubgpos] Vastly speed up ChainRuleSet / RuleSet matching Match the first component in a fast loop. Idea replicated from LigatureSet. Speeds up Gulzar shaping by 22%! 37% in NotoNastaliqUrdu!
Behdad Esfahbod 77080f86 2023-07-16T11:26:32 .
Behdad Esfahbod 62e10c9f 2023-07-16T08:43:18 Revert "[gsubgpos] Allocate iterators further up" This reverts commit b9f364b8fcacf8ab32d0272190d8509f214e55f2.
Behdad Esfahbod b9f364b8 2023-07-16T08:42:36 [gsubgpos] Allocate iterators further up To avoid calling set_match_func repeatedly. Doesn't show speedup. Going to revert.
Behdad Esfahbod f94508ed 2023-07-15T15:28:19 [Ligature] Micro-optimize
Behdad Esfahbod c41b0d7b 2023-07-10T17:23:58 [sanitize/PairValueRecord] Add a max_size for faster sanitize
Behdad Esfahbod d84c5f29 2023-07-08T15:22:51 Revert "[gsubgpos] Make (Chain)Context funcs templatized" This reverts commit 03ac08d267eb7ad2f1ac039115fc0030ea475fae.
Behdad Esfahbod e73223b9 2023-07-08T15:22:18 [gsubgpos] Make (Chain)Context funcs templatized Unfortunately they still won't be inlined because the matcher_t needs function pointers. So, no speed up. Going to revert.
Behdad Esfahbod 0b879afb 2023-07-07T22:35:43 [sanitize] Inline Coverage::sanitize
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 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 eae82788 2023-07-02T13:07:26 [GPOS] Micro-optimize lazy_some_gpos check Speeds up 11% in: BM_Font/load_face_and_shape/Roboto-Regular.ttf/hb
Behdad Esfahbod 46e54a23 2023-07-02T13:03:16 [GPOS] Remove extra check
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 0887382c 2023-06-30T11:39:46 [GPOS] Fix sanitize
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 d338506c 2023-06-30T10:13:05 [GPOS] Reuse sanitize_values_stride_unsafe in another function
أحمد المحمودي (Ahmed El-Mahmoudy) 10b9ca54 2023-06-28T07:46:33 Fix typo: subtitution -> substitution
Behdad Esfahbod 67b16247 2023-06-07T16:15:48 [set] Simplify a few set iterations as range loop
Behdad Esfahbod dcecb4d1 2023-06-05T16:03:36 [subset/ValueFormat] Micro-optimize
Behdad Esfahbod 469e82a2 2023-06-05T15:23:22 [subset/PairPos] Micro-optimize
Behdad Esfahbod 6593d2aa 2023-06-05T15:11:43 [subset/PairPos] Speed up
Behdad Esfahbod 82741304 2023-06-04T09:41:41 [subset] start_embed never returns nullptr Remove checks.
Behdad Esfahbod ca27925d 2023-06-03T16:18:15 Use hb_codepoint_pair_t in more places
Behdad Esfahbod 2f05c32c 2023-05-08T14:29:07 [Coverage] Minor access arrayZ directly in a couple places
Behdad Esfahbod 4ad443d5 2023-05-08T10:14:43 [Coverage/ClassDef] Don't call qsort if sorted already
Behdad Esfahbod 8df5cdbc 2023-05-07T15:49:50 [Coverage/ClassDef] Handle glyphID overflow in serialize
Behdad Esfahbod 71910fdf 2023-05-05T15:37:07 [Coverage] Remove unnecessary check
Behdad Esfahbod ee9b631d 2023-05-05T10:26:57 [SingleSubst] Fix condition to upgrade to beyond-64k
Behdad Esfahbod 0e9ebf10 2023-05-05T06:57:51 [config] Add HB_OPTIMIZE_SIZE_MORE and enable in HB_TINY Part of https://github.com/harfbuzz/harfbuzz/issues/4220
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 1be39729 2023-05-04T13:18:34 [subset] Support unordered glyphlist in Coverage/ClassDef serialize
Behdad Esfahbod a10fad7c 2023-05-04T11:32:07 [config] Add HB_NO_GDEF_CACHE
Behdad Esfahbod 319a488b 2023-05-04T10:36:48 [GDEF] Fix null check Fixes https://oss-fuzz.com/testcase-detail/5920994267889664
Behdad Esfahbod fb795dc3 2023-05-03T15:17:20 [GPOS] Optimize iterator reset Speeds up Gulzar shaping 5%.