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


Log

Author Commit Date CI Message
Behdad Esfahbod 7b8ae3d0 2025-03-13T10:44:40 [kern/kerx] Make zero-malloc
Behdad Esfahbod b861b541 2025-03-12T20:51:18 [kerx] Cosmetic
Behdad Esfahbod 54962b3f 2025-03-12T19:03:50 [morx] Consolidate a check
Behdad Esfahbod 4807a021 2025-03-12T18:27:27 [atomic] Kill hb_atomic_ptr_t<T> Use hb_atomic_t<T *> instead.
Behdad Esfahbod 4ec560dd 2025-03-07T16:14:24 [aat/morx] Refactor all glyph replacements into the context
Behdad Esfahbod c6972ac6 2025-03-07T15:29:48 [aat] Towards removing special deleting of 0xFFFF See https://github.com/harfbuzz/harfbuzz/discussions/5118 Remove the removal. Depend on the default_ignorable flag to hide them later. Test output adjusted.
Behdad Esfahbod ec4d4b01 2025-03-07T15:40:50 [morx] Update buffer on changes, in one more place Was missed out before I believe.
Behdad Esfahbod e9c2d78d 2025-02-12T10:44:34 [buffer] Clean up some small mess
Behdad Esfahbod 942a30b7 2025-02-05T14:21:49 [aat] Remove now-unused code
Behdad Esfahbod b857b21a 2025-02-05T13:15:15 [morx] Try using buffer-glyph-set adaptive to number of chains
Behdad Esfahbod cec5c571 2025-02-05T12:37:50 [aat] Refactor a method
Behdad Esfahbod d40c079f 2025-02-05T12:30:56 [morx] Use hb_bit_set_t instead of hb_set_t directly
Behdad Esfahbod fc825168 2025-02-05T11:17:18 [aat] Remove idempotent check Not necessary after the recent filtering. Another 10% speedup with LucidaGrande.
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 7d14eb5e 2025-02-05T10:46:28 [aat] Minor rename
Behdad Esfahbod 37bfdf79 2025-02-05T02:08:19 [morx] Only collect glyphs that can initiate action in the machine And match them against the buffer glyph_set. 4% speedup in LucidaGrande.
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 c87bfe41 2025-02-05T00:22:27 [morx] Reuse a variable
Behdad Esfahbod f0ead852 2025-02-04T23:27:03 [aat] Implement set filtering for Noncontextual chains as well
Behdad Esfahbod e5bdba0b 2025-02-04T23:03:23 [aat] Rename a variable
Behdad Esfahbod 22a21e81 2025-02-04T22:21:52 [aat] Fix a crash
Behdad Esfahbod 275fb565 2025-02-04T22:07:48 [morx] Clean up memory
Behdad Esfahbod 7862c7c5 2025-02-04T21:37:27 Rename a method again
Behdad Esfahbod 474bef1c 2025-02-04T19:17:13 [aat] Use exact set for buffer intersection versus subchains
Behdad Esfahbod 80bbb0b2 2025-02-04T18:42:33 [set-digest] Rename a method
Behdad Esfahbod 449c7f2a 2025-02-04T17:56:22 [aat] Add some tracing
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 e1cb3b15 2025-02-04T17:28:29 Revert "[aat] Remove set-digest" This reverts commit 832f199607292a41b4621b87a646c30cddc00124.
Behdad Esfahbod 359d163d 2025-02-04T17:11:46 Revert "[aat] Remove buffer-digest stuff" This reverts commit 7642366593826c0e04ad58df83fa63ec53960486.
Behdad Esfahbod 1ff46235 2025-02-04T16:46:25 [morx] Micro-optimize
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 d9a25bc4 2025-02-02T17:37:43 [aat] Allocate caches together No separate malloc.
Behdad Esfahbod 832f1996 2025-02-02T17:04:06 [aat] Remove set-digest Now that we have a class cache, this was just speeding things down.
Behdad Esfahbod 0e13e781 2025-02-02T16:50:04 [aat] Add a class-cache to the machine Speeds up Times.ttc benchmark by 20%.
Khaled Hosny 1e629c35 2025-01-12T23:06:23 [morx] Blocklist dysfunctional morx table of AALMAGHRIBI.ttf font Fixes #4108
Behdad Esfahbod 527e60b0 2024-09-24T09:18:08 [morx] Relax sanitizing Ignore claimed ChainSubtable length and only sanitize against the whole table. Works around what seems to be a broken LookupFormat0 in a Noncontextual subtable in GeezaPro on MacOS 15.0 Fixes https://github.com/harfbuzz/harfbuzz/issues/4873
Behdad Esfahbod fbcfc198 2024-05-13T15:49:00 [aat] Change buffer-digest threshold to 32
Behdad Esfahbod 3ff9ebc8 2024-05-13T14:46:55 [aat] For short words, use buffer digest to skip morx subtables Shows 3 / 4% speedup in en-words test case with Helvetica Neue.
Behdad Esfahbod 9ea29789 2024-05-13T14:43:47 [aat] Minor
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 23e4a3cf 2024-05-12T10:49:46 [aat/morx] Add an accelerator
Behdad Esfahbod 0828ccc5 2024-05-12T10:06:06 [aat] Move buffer out of StateTableDriver
Behdad Esfahbod d137d557 2024-04-11T08:53:17 [aat] Add (unused) SubtableGlyphCoverage
Behdad Esfahbod 225a7a8a 2024-02-24T15:12:42 [aat] Mark DELETED_GLYPH as IGNORABLE Fixes https://github.com/harfbuzz/harfbuzz/issues/4598
Behdad Esfahbod 2f528ce4 2023-11-06T11:40:19 Tweak a couple more 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
Behdad Esfahbod b37cc61d 2023-10-31T14:26:42 Add base types to OffsetTo<> Unused so far.
Behdad Esfahbod ed023f66 2023-01-12T17:04:24 Enable -Wformat-signedness And fix the codebase.
Behdad Esfahbod bfd7548e 2023-01-10T13:31:58 [aat] Optimize feature-range application
Behdad Esfahbod dd42939e 2023-01-10T13:23:19 [aat] Reduce unsafe_to_concat calls
Behdad Esfahbod 8b17c6ca 2023-01-10T12:17:38 [aat] Comment
Behdad Esfahbod 0e11d317 2023-01-10T12:16:04 [aat] Optimize feature application
Behdad Esfahbod 62383315 2023-01-10T11:29:04 [aat] Try fix leak on memory allocation failure
Behdad Esfahbod 2c9c49fd 2023-01-10T10:53:21 [aat] Support ranges in NonContextual subtable as well
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 59c45f6d 2022-11-22T12:54:50 Use hb_memcpy instead of memcpy consistently
Behdad Esfahbod f7f6d278 2022-07-17T22:15:42 Add hb_language_matches() New API: + hb_language_matches()
Behdad Esfahbod a972d05d 2022-07-17T21:42:04 [aat] Fix build
Behdad Esfahbod 2124ad89 2022-07-17T21:32:27 [aat/morx] Implement language-specific forms Test on Mac with, eg. $ hb-view /Library/Fonts/BigCaslon.ttf -u 107 vs $ hb-view /Library/Fonts/BigCaslon.ttf -u 107 --language pl Fixes https://github.com/harfbuzz/harfbuzz/issues/1373
Behdad Esfahbod 9e1479b5 2022-06-01T07:54:45 [morx] Limit context length Fixes https://github.com/harfbuzz/harfbuzz/issues/3097
Behdad Esfahbod 4d48fae4 2022-04-20T11:35:19 Enforce Regional_Indicators native direction to LTR And undo the morx direction reversal change introduced in https://github.com/harfbuzz/harfbuzz/pull/3315 23159084b43c1ce429d9e98035bf845919fd8a89 This fixes original bug https://github.com/harfbuzz/harfbuzz/issues/3314 And the reversion in morx code fixes regressions: https://github.com/harfbuzz/harfbuzz/issues/3528 https://github.com/harfbuzz/harfbuzz/issues/3535 Supersedes: https://github.com/harfbuzz/harfbuzz/pull/3529
Behdad Esfahbod 23159084 2021-12-10T15:00:16 [morx] Reverse graphemese, not whole buffer Fixes https://github.com/harfbuzz/harfbuzz/issues/3314 Supersedes https://github.com/harfbuzz/harfbuzz/pull/3315
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
Jonathan Kew 4f1e8d2b 2021-05-05T11:11:43 [aat] Update glyph properties from GDEF if available when doing a replacement.
Behdad Esfahbod 5efe3609 2021-03-31T15:33:22 Rename (Unsized)OffsetListOf
Behdad Esfahbod 34a1204f 2021-03-15T14:39:06 [buffer] HB_NODISCARD output_glyph() Also, generalize and use replace_glyphs() in morx where output_glyph() was used in a loop.
Behdad Esfahbod 2a0dbb3e 2021-03-15T14:10:39 [buffer] HB_NODISCARD copy_glyph()
Behdad Esfahbod cac6c86d 2021-03-15T13:46:54 [buffer] HB_NODISCARD move_to()
Behdad Esfahbod 3f1998a0 2021-03-15T13:33:44 [buffer] HB_NODISCARD replace_glyph()
Behdad Esfahbod 567cedcc 2021-02-22T22:09:15 Narrow down cast operators on IntType Say for USHORT, we were implementing casts from and to unsigned. With this change, we cast from and to uint16_t only. This allows compiler more opportunities to catch possible narrowing issues in the code. It needed a couple of fixes in the codebase though, because previously, if a USHORT was participating in arithmetic with signed numbers, eg. "u + 1", the result would have been unsigned. With this change, it would be signed. The correct fix is to update the code to read "u + 1u". That said, I think about conditionally adding back the cast out to signed/unsigned, to facilitate better type deduction. But I couldn't think of a real situation where that would help with anything. So I didn't add. Here's what it was: template <typename Type2 = hb_conditional<hb_is_signed (Type), signed, unsigned>, hb_enable_if (sizeof (Type) < sizeof (Type2))> operator hb_type_identity_t<Type2> () const { return v; } https://github.com/harfbuzz/harfbuzz/pull/2875
Ebrahim Byagowi d0e2addd 2020-07-18T22:14:52 minor
Ebrahim Byagowi 9566904c 2020-07-14T15:17:17 [morx] minor, mark with unlikely at least just to show this is the unusual path
Ebrahim Byagowi 11d583a9 2020-07-14T06:23:06 [aat] Consume glyph insertion from buffer's max_ops (#2223) Glyph insertion is an expensive operation and we like to have it limited based on buffer's input size which is handled by buffer's max_ops. clusterfuzz-testcase-minimized-harfbuzz_fuzzer-5754958982021120: Before the change: 0.67s user 0.00s system 99% cpu 0.674 total After the change: 0.02s user 0.00s system 98% cpu 0.024 total Which takes much longer on valgrind and tsan bots.
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)
Ebrahim Byagowi 2dda6dd7 2020-04-20T14:12:45 minor, tweak spacing turn 8 spaces to tab, add space before Null/Crap
Jonathan Kew 573b6bf8 2020-03-30T23:20:30 Handle non-exclusive features when mapping OpenType tags to AAT feature type/selector pairs. Fixes #2290.
Simon Cozens bef7ef81 2020-03-30T16:39:43 Reformat kerx/morx instrumentation to 'verb noun identifier'
Ebrahim Byagowi d512087e 2019-09-14T10:36:29 Rename GlyphID to HBGlyphID Avoid collision with macOS's ATSUnicodeTypes.h GlyphID
Behdad Esfahbod 170b5dd8 2019-09-08T16:34:11 [aat] Minor
Behdad Esfahbod a0695687 2019-09-08T16:32:12 [aat] Minor
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 e970de48 2019-01-24T18:16:17 [AAT] Minor sign
Behdad Esfahbod a371a28c 2019-01-24T18:12:25 [AAT] Use a ring buffer for ligature stack I think Apple does very similarly, but probably with a stack size of 16. We do it with a stack size that is currently set to 64. Fixes https://github.com/harfbuzz/harfbuzz/issues/1531