src/OT/Layout/GPOS

Branch


Log

Author Commit Date CI Message
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 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 9794ad9e 2025-08-16T15:51:05 [external_cache] Remove a conditional (#5471)
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 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 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
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
Qunxin Liu 5dbb8141 2025-07-11T08:58:01 [subset] AnchorFormat3: better check for when should downgrade to format1
Qunxin Liu 95dc1109 2025-07-10T09:52:07 [subset] bug fix Don't downgrade to format1 when subsetting
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 14ecea57 2025-03-27T15:44:49 Merge branch 'main' into HVF
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 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 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 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
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
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
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 c41b0d7b 2023-07-10T17:23:58 [sanitize/PairValueRecord] Add a max_size for faster sanitize
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
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 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 fb795dc3 2023-05-03T15:17:20 [GPOS] Optimize iterator reset Speeds up Gulzar shaping 5%.
Behdad Esfahbod 323a1fe4 2023-05-03T13:52:43 [PairPos] Fix what I broke
Behdad Esfahbod a6f5f0dc 2023-05-03T13:45:39 [PairSet] Micro-optimize
Behdad Esfahbod 4e495eb0 2023-05-03T13:40:46 [PairPos] Add an unlikely
Behdad Esfahbod 5528bdd4 2023-05-03T13:35:10 [PairPos] Remove a likely
Behdad Esfahbod 045ae4b0 2023-05-03T13:08:43 [GPOS] Micro-optimize
Behdad Esfahbod 95f15557 2023-05-02T16:37:31 [PairPosFormat2] Micro-optimize and don't kern if class2=0 If class2=0 we expect no kerning to happen. Just bail out.
Behdad Esfahbod 59967154 2023-05-02T15:52:43 [PairPos2] Micro-optimize
Behdad Esfahbod e826d94a 2023-04-30T11:11:19 Call roundf() instead of _hb_roundf() The former is defined as a macro expanding to the latter.
Behdad Esfahbod 06504cb0 2023-04-28T13:13:18 [PairPosFormat2] Minor use false instead of 0
Behdad Esfahbod 9ed43dc5 2023-04-28T12:38:26 [PairPosFormat2] Reuse a value
Garret Rieger a84cae42 2023-03-15T02:39:57 [subset] Don't add invalid gids (-1) to the glyphset when loading glyph map from the accelerator.
Behdad Esfahbod 08784baf 2023-03-02T10:48:30 [GSUB/GPOS] Fix sanitization in Format1 Fixes https://oss-fuzz.com/testcase-detail/5120727025319936
Behdad Esfahbod c67c0086 2023-03-01T13:32:44 [GPOS] Fix indexing in MarkLigPos This was broken in 8708b9e081. Fixes https://github.com/harfbuzz/harfbuzz/issues/4142
Garret Rieger 918193eb 2023-02-22T23:11:29 [subset] fix a class of fuzzer timeouts caused by large shared coverage tables. More acurately estimates the op count for CoverageFormat2 tables as the population size instead of the size in bytes.
Behdad Esfahbod adccc535 2023-02-17T12:29:42 [MarkBase] Adjust base-finding logic Fixes https://github.com/harfbuzz/harfbuzz/issues/4124
Behdad Esfahbod 64fa5cd4 2023-02-07T15:50:36 [GPOS] Fix assert fail introduced recently Was introduced in 8708b9e081192786c027bb7f5f23d76dbe5c19e8. If these lookups are recursed to from (Chain)Context out-of-order, it was possible that last_base > buffer->idx, in which case we were attaching marks to a base after them... and an assertion was failing fortunately. Fixes https://oss-fuzz.com/testcase-detail/6377756666757120
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 749df4ee 2023-01-21T16:00:54 [PairPosFormat1] One more
Behdad Esfahbod b648ceb7 2023-01-21T15:58:59 [PairSet] Optimize last commit
Behdad Esfahbod 89162324 2023-01-21T15:57:18 [PairSet] Unify get_size()
Behdad Esfahbod b63159e8 2023-01-21T15:50:48 [PairPosFormat1] Fix stride Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55287 and generally the lookup with MediumTypes.
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.
Behdad Esfahbod ed023f66 2023-01-12T17:04:24 Enable -Wformat-signedness And fix the codebase.
Behdad Esfahbod b33eb9ec 2023-01-11T11:20:04 [subset-plan] Simplify layout_variation_idx_delta_map allocation
Behdad Esfahbod c482b061 2022-12-03T13:14:31 [gpos] Optimize PairPosFormat1::intersects
Behdad Esfahbod 3e151139 2022-11-28T14:23:49 [PairPos] Optimize get_effective_value_format Speeds up BM_subset/subset_glyphs/SourceHanSans-Regular_subset.otf/nohinting/512 12%.