src/OT/Layout

Branch


Log

Author Commit Date CI Message
Garret Rieger 07ee609f 2025-10-20T20:06:43 Fix invalid pointer conversions in graph Coverage. (#5622) For #5604.
Behdad Esfahbod 4a26e289 2025-09-30T15:31:04 Add `hb_ot_layout_lookup_collect_glyph_alternates()` (#5367) * [map] Massage operator << overloads * [ot-layout] Add +hb_ot_layout_lookup_collect_glyph_alternates To collect all glyph mapping from SingleSubst or AlternateSubst lookups in one call. Needed by FreeType autohinter for performance. New API: +hb_ot_layout_lookup_collect_glyph_alternates() * [layout] Change hb_ot_layout_lookup_collect_glyph_alternates() API https://github.com/harfbuzz/harfbuzz/pull/5367#discussion_r2149019638
Behdad Esfahbod af286b8f 2025-09-30T12:59:34 [Coverage] Simplify initialization
Behdad Esfahbod fc761725 2025-09-24T12:42:53 [ValueFormat] comment
Behdad Esfahbod d350cb83 2025-09-23T19:47:01 Speed up ValueFormat len() calc
Behdad Esfahbod a89c36e0 2025-09-02T13:05:11 [GPOS/kerx] Support attaching marks to bases after them (#5520) See comments. Fuzzer found. I'm surprised this was not discovered before though. I hope I have not missed anything. Fixes https://oss-fuzz.com/testcase-detail/6399443634290688
Behdad Esfahbod c61a4f26 2025-08-29T02:11:52 [GPOS] Micro-optimize offset propagation
Behdad Esfahbod bc6eba94 2025-08-27T13:29:15 Fix kerx attachment shaping issues (#5515) * [ot-shape] Don't zero offsets of default-ignorables Part of fixing https://github.com/harfbuzz/harfbuzz/issues/5514 * [ot-shape] Propagate chain offsets in opposite direction if RTL Part of fixing https://github.com/harfbuzz/harfbuzz/issues/5514
Behdad Esfahbod 6b62d367 2025-08-25T14:02:59 [ligature-cache] Handle case of ligature with no components (#5500) In the cache with "seconds" set-digest.
Behdad Esfahbod 8bdedb3b 2025-08-20T00:27:41 Limit external caches (#5483) * Revert "[external_cache] Remove a conditional (#5471)" This reverts commit 9794ad9e00ff66741c36ec9511e3e968663b74a7. * Limit external_cache to 8 subtables per lookup
Behdad Esfahbod 22545743 2025-08-20T00:06:00 Match positions no malloc (#5481) * Reduce allocation of match_positions by caching one in ctx * Use a stack-array for small match-positions This surgically enables stack-backed storage in vector. * Handle match-positions alloc failure And make allocations unchecked. * Clean up CFF hack to use static storage in vector * Fixup for match_positions allocations * Fix vector handling of foreign arrays memory management
Behdad Esfahbod 9794ad9e 2025-08-16T15:51:05 [external_cache] Remove a conditional (#5471)
Behdad Esfahbod 368598b5 2025-08-16T00:38:42 Increase match_positions stack allocation from 4 to 8 (#5468) Slight speedup on NotoNastaliq.
Behdad Esfahbod dae2c8bb 2025-08-14T22:26:40 [ligature] Add a set-digest on the second component (#5464)
Behdad Esfahbod 8268473a 2025-08-14T21:57:19 Add external_cache_create separate from cache_func (#5463) * Add external_cache_create separate from cache_func * Simplify cache_func_t signature * Rename a cache type * Rename another cache type
Behdad Esfahbod cf614fc8 2025-08-14T16:23:45 [LigatureSet] Use slow path only if <= 1 ligatures (#5462)
Behdad Esfahbod 4aa7dcba 2025-08-12T03:18:38 [Coverage cache] Micro-optimize
Behdad Esfahbod a4dbb7d4 2025-08-12T02:34:49 [Coverage] Cache NOT_COVERED effectively (#5453) Before, our cache.set was always failing for NOT_COVERED, making the cache ineffective for uncovered glyphs. Fix that. Some nice speedups in Latin fonts.
Behdad Esfahbod 6ec1b279 2025-08-11T01:14:19 [lookup] Give each subtable an external-cache opportunity (#5449) * [lookup] Give each subtable an external-cache opportunity * [subtable-cache] Fixups
Qunxin Liu cd49b14b 2025-07-29T14:32:26 [subset] add more aggressive pruning for MarkLigPos and MarkMarkPos (#5434) Remove lig/mark glyphs without defined anchor points after subsetting
Behdad Esfahbod 11daf566 2025-07-26T06:31:48 [GDEF] Rename a var
Behdad Esfahbod 7b56d3a1 2025-07-26T05:35:57 [ot-layout] s/hb_ot_lookup_cache_t/hb_ot_layout_mapping_cache_t/g
Behdad Esfahbod 09978fc5 2025-07-26T04:20:59 [ot] Rename hb_ot_lookup_cache_op_t, and cache to subtable_cache
Behdad Esfahbod 786f8381 2025-07-25T04:00:37 [GDEF] Use bit-set instead of set-digest for mark glyph classes Most fonts don't even have these. Some, like NotoSansDuployan have huge ones. This speeds it up by 25%.
Qunxin Liu 879c4ac7 2025-07-24T14:13:16 [subset] MarkBasePos: remove base glyphs with empty base record BaseRecord could become empty if all anchor offsets for retained mark classes are null
Behdad Esfahbod 3d154bc6 2025-07-14T13:53:27 [buffer-message] Fix potential buffer overflow... ...when buffer messaging is enabled and with malicious font. Fixes https://github.com/harfbuzz/harfbuzz/security/advisories/GHSA-p965-5rr7-9mhq
Qunxin Liu 5dbb8141 2025-07-11T08:58:01 [subset] AnchorFormat3: better check for when should downgrade to format1
Behdad Esfahbod 6ed598e1 2025-07-10T13:03:44 Merge pull request #5382 from harfbuzz/lig_split [repacker] Implement table splitting for LigatureSubst
Qunxin Liu 95dc1109 2025-07-10T09:52:07 [subset] bug fix Don't downgrade to format1 when subsetting
Garret Rieger 38ab13c6 2025-07-04T22:31:04 [repacker] add support for splitting GSUB Ligature lookups.
Behdad Esfahbod 47089fe7 2025-05-28T17:10:22 Big misc changes - Make geometry types into templates taking float or double. - Changes to paint() transform elimination. - Add font->has_nonzero_coords and use it across. - Extensions to avar processing for otherwise invalid mappings.
Behdad Esfahbod c124252d 2025-05-31T16:32:58 [algs] Add support for little-endian int types As well as 64bit-int, and float types. Add Align type.
Behdad Esfahbod a13fd9ae 2025-05-21T12:23:19 Merge branch 'main' into HVF
Behdad Esfahbod 89e28a23 2025-05-10T16:30:35 [skippy-iter] Use auto for type deduction
Behdad Esfahbod d92106df 2025-04-24T21:42:20 Merge branch 'main' into HVF
Behdad Esfahbod 59334682 2025-04-23T20:56:32 [shape] Only apply slant to shaping results if horizontal
Behdad Esfahbod fd9a2f23 2025-04-07T17:44:45 [GPOS] Regain speed
Behdad Esfahbod e3c2910f 2025-04-02T01:48:12 Merge branch 'main' into HVF
Behdad Esfahbod 7f5fafec 2025-04-01T21:35:28 [GDEF] Simplify cache declaration
Behdad Esfahbod 14ecea57 2025-03-27T15:44:49 Merge branch 'main' into HVF
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 9b6da299 2025-03-02T17:00:14 [font/var] Try to regain performance of all-normalized-coords=0
Behdad Esfahbod d0710061 2025-01-17T19:32:34 [open-type/algs] Rename Int to Num in some types In anticipation of float types.
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