src/hb-aat-layout-kerx-table.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 7b8ae3d0 2025-03-13T10:44:40 [kern/kerx] Make zero-malloc
Behdad Esfahbod 6388ce22 2025-03-12T20:58:06 [kerx] We don't need right_set in machine kerning
Behdad Esfahbod b861b541 2025-03-12T20:51:18 [kerx] Cosmetic
Behdad Esfahbod 7146e581 2025-03-12T20:11:30 [kerx] Remove redundant check
Behdad Esfahbod 41b396c6 2025-03-12T20:02:58 [kerx] Setup buffer glyphset
Behdad Esfahbod 83e0944f 2025-03-12T19:58:35 [kerx] Use a machine class cache Like in morx.
Behdad Esfahbod 02733ded 2025-03-12T19:44:07 [kerx] Skip machine subtables that don't intersect the buffer We do this extensively in morx. Do it here too. Still no machine class cache in kerx. Speeds up GeezaPro shaping Arabic text by 20%.
Behdad Esfahbod 7bdc6c9a 2025-02-06T02:47:13 Whitespace
Behdad Esfahbod cd5dfc6d 2025-02-05T12:32:02 [kerx] Use hb_bit_set_t instead of hb_set_t
Behdad Esfahbod 849b1735 2025-02-05T11:05:29 [aat] Divide the logic of is_actionable() into two The two different uses require different logic. I had combined the two logic into one in 37bfdf79c66ffbe4a5f02dbbc13756865ca11c1e
Behdad Esfahbod d9e99baa 2025-02-05T02:06:59 [aat] Move is_actionable outside of the driver_context
Behdad Esfahbod 5ade5bab 2025-02-05T01:53:09 [aat] Move Flags out of driver_context_t
Behdad Esfahbod 9f38690e 2025-02-05T01:39:28 [aat] Remove another unused parameter One logic change, but should be fine.
Behdad Esfahbod d9058c64 2025-02-05T01:38:06 [aat] Remove an unused parameter
Behdad Esfahbod 722ab548 2025-02-04T17:59:39 [kerx] Don't compute buffer digest We don't use it in kerx
Behdad Esfahbod 3a1d7ee7 2025-02-04T17:33:42 [aat] Remove the buffer-digest threshold This can help us skip entire subchains, eg. when they are for different scripts. Speeds up LucidaGrande with ASCII text by 20%.
Behdad Esfahbod 359d163d 2025-02-04T17:11:46 Revert "[aat] Remove buffer-digest stuff" This reverts commit 7642366593826c0e04ad58df83fa63ec53960486.
Behdad Esfahbod 76423665 2025-02-04T13:19:43 [aat] Remove buffer-digest stuff With both morx & kerx sped up now using cache / set, this is not beneficial anymore. Remove it.
Behdad Esfahbod 9a4601b0 2025-02-04T13:14:04 [kern/kerx] Use hb-set-t for left/right, to guard bsearch Use a set of all left glyphs participating in kerning, and all right glyphs participating in kerning, and use these two to weed out non-kerning pairs before bsearching into the kerns. Speeds up shaping of HelveticaNeue by ~10%.
Behdad Esfahbod 204778e8 2024-05-13T15:59:54 [aat] Use buffer-digest for non-state-machine kerning as well
Behdad Esfahbod fbcfc198 2024-05-13T15:49:00 [aat] Change buffer-digest threshold to 32
Behdad Esfahbod f536a416 2024-05-13T15:43:50 [aat] For short words, use buffer digest to skip kerx machine subtables Shows 3 / 4% speedup in fa-words test case with GeezaPro.
Behdad Esfahbod 3d3c6db4 2024-05-13T11:00:21 [kern] Allow format 1 / 3 in OT-style kern table Otherwise we were failing to sanitize them, and Bad Things were happening after.
Behdad Esfahbod e2ab6c7b 2024-05-12T15:25:13 [kern/kerx] Add accelerator and set-digest filtering
Behdad Esfahbod 5f32c60d 2024-05-12T15:16:25 [kerx] Remove set-digests since accelerator is not shared
Behdad Esfahbod 0828ccc5 2024-05-12T10:06:06 [aat] Move buffer out of StateTableDriver
Behdad Esfahbod 5a405b31 2024-05-11T10:03:47 [aat] First sketch at using hb_set_digest_t They are not cached in an accelerator yet.
Behdad Esfahbod d137d557 2024-04-11T08:53:17 [aat] Add (unused) SubtableGlyphCoverage
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
Behdad Esfahbod ed023f66 2023-01-12T17:04:24 Enable -Wformat-signedness And fix the codebase.
Behdad Esfahbod dd42939e 2023-01-10T13:23:19 [aat] Reduce unsafe_to_concat calls
Behdad Esfahbod db4c8747 2023-01-09T21:32:15 Revert "Revert "[aat] Support feature ranges"" This reverts commit 6a7a38521f940216f1e9e2fa2bf22f7b45ce2aef.
Behdad Esfahbod 6a7a3852 2023-01-09T21:29:19 Revert "[aat] Support feature ranges" This reverts commit 1b7994cb3a3c35f3618d7f40c7289496bdab6f06. Broke Zapfino with partial ligature disabling. Debugging.
Behdad Esfahbod 1b7994cb 2023-01-09T19:38:50 [aat] Support feature ranges The hard way... A bit uglier than I liked it to be, but is proper at least. Fixes https://github.com/harfbuzz/harfbuzz/issues/4020
Behdad Esfahbod 622a6869 2023-01-09T18:14:40 Revert "Revert "Revert "[aat] Allow disable feature ranges""" This reverts commit 5202053c2c5fb2c8af9704e690b25a26bf2a0295.
Behdad Esfahbod 5202053c 2023-01-09T17:29:43 Revert "Revert "[aat] Allow disable feature ranges"" This reverts commit 82b3e8af69b09fd908d1cd27b669234328d4a500. Another try. Fixes https://github.com/harfbuzz/harfbuzz/issues/4020
Behdad Esfahbod 82b3e8af 2023-01-09T17:28:52 Revert "[aat] Allow disable feature ranges" This reverts commit 24a4d397bae6b614215086c85a714dc789af3e7f. This was broken.
Behdad Esfahbod 24a4d397 2023-01-09T17:26:08 [aat] Allow disable feature ranges Fixes https://github.com/harfbuzz/harfbuzz/issues/4020 This is a hack. To implement this properly we need to treat runs with different features as independent runs for running the state machine, as the subtable flags might be different. That would be a significant change to our internal implementation.
Behdad Esfahbod 7c4e9080 2022-07-11T14:01:52 [sanitize] Minor trace format fixup This likely() is unlikely to make a difference, and obscures the return_trace() message by writing out "something" instead of the true/false value.
Behdad Esfahbod 050f1690 2022-06-28T18:52:27 [GPOS/kerx] Call into impl namespace from kerx
Behdad Esfahbod bcdfedbc 2022-01-22T11:19:05 [unsafe-to-concat] Mark as unsafe in kern machine Fixes that last test. Yay!
Behdad Esfahbod c0058892 2022-01-20T15:51:04 [unsafe-to-concat] Mark entire buffer unsafe-to-concat if kerx format2
Behdad Esfahbod 6d555ce8 2021-11-02T00:18:22 [meta] Use std::forward instead of hb_forward()
Behdad Esfahbod c852b868 2021-09-19T16:30:12 Rename HBGlyphID to HBGlyphID16
Behdad Esfahbod ad28f973 2021-03-31T12:49:14 Rename offset types to be explicit about their size Add Offset16To<>, Offset24To<>, and Offset32To<> for most use-cases.
Ebrahim Byagowi 46ec6db9 2020-07-22T17:30:48 minor
Ebrahim Byagowi d0e2addd 2020-07-18T22:14:52 minor
jfkthame 1e6027e2 2020-07-05T22:44:10 [aat] Correct array indexing when looking up actions in KerxSubTableFormat4 (#2539) * [aat] Correct array indexing when looking up actions in KerxSubTableFormat4. - For action_type 0 and 1, there are 2 values per action record; for action_type 2, there are 4. So we need to account for these factors when indexing into the ankrData array. Fixes https://github.com/harfbuzz/harfbuzz/issues/2531.
Behdad Esfahbod e7c79e16 2020-06-17T15:32:40 Merge pull request #2287 from simoncozens/instrumentation Add messages for GPOS/GSUB (take 2)
Simon Cozens fe926970 2020-06-16T09:12:44 Reformat messages again Messages can be: start/end table XXXX start/end lookup NNNN start/end subtable NNNN (for kerx/kern) start/end chainsubtable NNNN (for morx)
jfkthame 100d40c8 2020-05-06T01:48:24 [aat] Fix implementation of AAT kerning for Geeza Pro. (#2388) * [aat] Fix implementation of AAT kerning for Geeza Pro. Despite what the comment in the code used to say, it appears that Geeza Pro does rely on accumulating kerning values from successive subtables. With this change, the results now match Core Text rendering (and avoid the clear visual breakage reported in #2358). Testcase: U+0644,U+064E,U+0645,U+064E,U+0651,U+0627 Fixes #2358. * [aat] Update test expectations, add new testcase.
Simon Cozens bef7ef81 2020-03-30T16:39:43 Reformat kerx/morx instrumentation to 'verb noun identifier'
Ebrahim Byagowi 0558413f 2019-10-01T13:49:55 Minor, tweak spaces
Ebrahim Byagowi d512087e 2019-09-14T10:36:29 Rename GlyphID to HBGlyphID Avoid collision with macOS's ATSUnicodeTypes.h GlyphID
Behdad Esfahbod 5902198c 2019-09-06T21:36:31 [kerx] Fix offset issue in kern format 2 Fixes tests with HB_VAR_ARRAY != 1, as done in previous commit.
Ebrahim Byagowi a0b4ac4d 2019-08-24T17:57:14 Turn 8 spaces to tab across the project According to the current code style of the project
Behdad Esfahbod 83e3eabd 2019-05-07T20:58:43 Whitespace
Behdad Esfahbod 41248cce 2019-05-07T20:54:31 Remove MIN/MAX in favor of hb_min/hb_max
Behdad Esfahbod 36bb24f7 2019-05-05T10:14:17 [dispatch] Forward arguments in all dispatch multiplexers
Ebrahim Byagowi 92588782 2019-04-30T13:05:10 Remove space between right angle brackets now that we have C++11 (#1689)
Behdad Esfahbod b9769402 2019-01-24T18:01:07 [AAT] Handle transition errors during machine operation Before we used to give up. Now, just ignore error and continue processing. Fixes https://github.com/harfbuzz/harfbuzz/issues/1531
Behdad Esfahbod 1ec90514 2019-01-24T17:21:41 [AAT] Minor
Behdad Esfahbod 5d4b0377 2019-01-22T12:11:24 Convert unsigned enum class consts to static constexpr Part of https://github.com/harfbuzz/harfbuzz/issues/1553
Behdad Esfahbod ef006549 2019-01-22T12:08:57 Convert tag enum class consts to static constexpr Part of https://github.com/harfbuzz/harfbuzz/issues/1553
Behdad Esfahbod 39e1b6d0 2019-01-22T12:07:43 Convert boolean enum class consts to static constexpr Part of https://github.com/harfbuzz/harfbuzz/issues/1553
Behdad Esfahbod 7e6bd510 2019-01-17T18:24:18 Use NNOffsetTo<> in rest of places
Behdad Esfahbod 347ad454 2019-01-17T17:47:29 [AAT] Remove unused code
Behdad Esfahbod a262eb3d 2019-01-17T14:06:32 [aat] Minor
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Ebrahim Byagowi b2ebaa9a 2018-12-16T22:38:10 Remove redundant 'inline' from methods (#1483)
Behdad Esfahbod 5c4fead7 2018-11-29T15:04:34 Convert "static const hb_tag_t" constants to enum
Behdad Esfahbod 9e4138c8 2018-11-29T15:01:10 Convert misc "static const" constants to enum
Behdad Esfahbod 44cbd2ea 2018-11-29T14:53:43 Convert "static const bool" constants to anonymous enum
Behdad Esfahbod 42a2b496 2018-11-28T15:24:30 [kerx] Fix Format2 index calc again
Behdad Esfahbod a3267cf8 2018-11-28T15:06:01 [kern] Fix kern table Format2 offsetToIndex Fixes https://github.com/harfbuzz/harfbuzz/issues/1421
Behdad Esfahbod f9a9c0fd 2018-11-28T14:51:56 [kerx] Fix ClassTable implementation for 'kern' table Format 2
Behdad Esfahbod c5a6b355 2018-11-24T23:49:23 [kerx] Port to hb_sanitize_with_object_t
Behdad Esfahbod b3c5affc 2018-11-24T23:34:34 Simplify sanitize set_object()
Behdad Esfahbod c8a2dc82 2018-11-24T22:16:53 Revert "[aat.kerx] Remove kerx subtable boundary enforcement" This reverts commit 15905a2a2998f7ddd964f920a4828602235d6b00.
Behdad Esfahbod 15905a2a 2018-11-24T17:14:39 [aat.kerx] Remove kerx subtable boundary enforcement Have not encountered fonts needing this, but same reasoning as for morx (see previos commit.)
Behdad Esfahbod 20edc70d 2018-11-24T14:52:34 [morx/kerx] Fix sanitize regression Broke in 8dcc1913a1670ede7b124f7b5b775d7ab8791386 If sanitizer is left with another object, it wouldn't work. Better fix coming soon.
Behdad Esfahbod 8dcc1913 2018-11-24T09:47:45 [kerx/morx] Make sure object length is sanitized before accessing it
Behdad Esfahbod 30cb45b3 2018-11-24T00:35:31 Change ArrayOf.bsearch() return semantics Towards consolidating all array bsearch/...
Behdad Esfahbod 9552f4ef 2018-11-23T15:24:17 [kern] Don't enforce length of last subtable
Behdad Esfahbod 74896226 2018-11-23T11:10:17 [aat] Disable mark advance zeroing if kern table has state-machines Geeza Pro for example, relies on that for fancy mark positioning. Fixes https://github.com/harfbuzz/harfbuzz/issues/1405
Behdad Esfahbod 758c9d68 2018-11-22T22:16:12 [morx/kerx] Limit range to subtable when sanitizing
Behdad Esfahbod a9fe787a 2018-11-22T22:12:36 [sanitizer] Add reset_object(), make set_object() do bounds-check Affects morx/kerx run-time only currently. Will adjust their sanitize next.
Behdad Esfahbod 2c8188bf 2018-11-22T22:02:19 [kerx] Make sure subtables are non-zero-length Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11400
Behdad Esfahbod 274f4c72 2018-11-12T14:24:36 Rename check_array2() to check_array()
Behdad Esfahbod c8f4cc49 2018-11-12T14:11:29 [kerx] Fix integer overflow in multiply Fixes https://oss-fuzz.com/v2/testcase-detail/5754863779053568
Behdad Esfahbod 1300f027 2018-11-12T13:56:48 [kerx] Minor tweak on previous commit
Behdad Esfahbod a549aa14 2018-11-12T13:01:22 [kerx] Protect against stack underflow Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11367
Behdad Esfahbod 752bd8a1 2018-11-10T21:13:13 [kerx] Fix Format1 tupleKern sanitization Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11312 Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11305
Behdad Esfahbod b18a56a2 2018-11-07T18:13:22 [kerx] Comment
Behdad Esfahbod 006386be 2018-11-07T18:04:53 [kern] Implement negative state numbers Let the fuzzing bots rip this code apart...
Behdad Esfahbod 9af983af 2018-11-07T16:03:09 [kern] Switch to dispatch
Behdad Esfahbod bc06e280 2018-11-07T16:02:40 [kerx/kern] Add has_cross_stream()
Behdad Esfahbod ea579f9c 2018-11-07T15:44:40 [kerx] Fix peculiar indexing that was needed previously Not needed now that we use GPOS attachment for cursive kerx.