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


Log

Author Commit Date CI Message
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
Behdad Esfahbod 7886b157 2019-01-24T18:06:17 Whitespace
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 36fb2b4d 2019-01-23T20:53:57 [AAT] In InsertionChain, set mark to previous-position if inserting Fixes MORX-31
Behdad Esfahbod baf4d6a6 2019-01-23T20:36:07 [AAT] Remove mark_set from InsertionChain
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 7a6686a5 2019-01-14T15:09:14 [AAT] Fix mort ContextualSubtable offset access Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12312
Behdad Esfahbod 1043ddbe 2018-12-27T18:27:11 [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 fb059082 2018-11-30T20:45:40 Revert ugly fixes Now that we have 6daf45e0, revert cryptic hacks... This reverts commit abd81ed4f5cbc5a94171747909bc6b77551cb929. This reverts commit 9c6921c08c905a0cf45ba0182134e6ff910fac51. This reverts commit d39760cabfe4007cefdfc45231e85e93fababac2. This reverts commit fedd8e6c176dea85194693399e50243eb1c117c4. Fixes https://github.com/harfbuzz/harfbuzz/issues/1374
Behdad Esfahbod 9c6921c0 2018-11-30T15:16:57 More... hb-ot-layout-gsubgpos.hh:1707: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: ...
Behdad Esfahbod 5c4fead7 2018-11-29T15:04:34 Convert "static const hb_tag_t" constants to enum
Behdad Esfahbod 44cbd2ea 2018-11-29T14:53:43 Convert "static const bool" constants to anonymous enum
Behdad Esfahbod 2cb235d0 2018-11-23T12:23:35 [aat.feat] Fix enum namespace
Ebrahim Byagowi 54f4c17f 2018-11-23T12:05:06 [feat] Rename API uses of setting to selector
Ebrahim Byagowi a8726cb4 2018-11-17T14:23:11 [feat] Use bsearch
Ebrahim Byagowi 9212ec20 2018-11-09T00:50:10 [feat] Complete feature types list
Ebrahim Byagowi 7a0471aa 2018-11-01T21:38:54 [feat] Turn AAT feature id into enum
Ebrahim Byagowi 19b60255 2018-11-17T01:07:09 [feat] Address @behdad comments
Ebrahim Byagowi 95abd537 2018-11-01T13:14:29 [feat] Expose public API * hb_aat_get_feature_settings
Behdad Esfahbod c405ed05 2018-11-24T23:46:15 [morx] Port to hb_sanitize_with_object_t
Behdad Esfahbod b3c5affc 2018-11-24T23:34:34 Simplify sanitize set_object()
Behdad Esfahbod 748198a6 2018-11-24T22:16:59 Revert "[aat.morx] Remove set_object() business" This reverts commit ae8ed58a6e53441d9ccbf67afd8a00b815cde99e. Apparently this broke Apple Chancery from OS X 10.12 :(. Investigating...
Behdad Esfahbod ae8ed58a 2018-11-24T17:11:09 [aat.morx] Remove set_object() business With OS X 10.13 Apple Chancery fails to ligate if we limit each morx sub-chain to its declared length. Perhaps their newer compiler does object-sharing across sub-chains. Anyway, since that's a valid, if unspecified, way to compile tables, remove enforcement. Probably do the same with kern/kerx.
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 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 29c53023 2018-11-07T17:29:37 [morx] Minor
Behdad Esfahbod 385f78b3 2018-11-07T17:19:21 [aat] Remove deleted-glyhs after applying kerx/kern Finally: Fixes https://github.com/harfbuzz/harfbuzz/issues/1356 Test case: $ ./hb-shape GeezaPro.ttc -u U+0628,U+064A,U+064E,U+0651,U+0629 [u0629.final.tehMarbuta=4+713|u064e_u0651.shaddaFatha=1@0,-200+0|u064a.medial.yeh=1+656|u0628.initial.beh=0+656] The mark positioning (kern table CrossStream kerning) only works if deleted glyph (as result of ligation) is still in stream and pushed through the state machine.
Behdad Esfahbod 241ba7da 2018-11-07T11:51:40 [morx/kerx] Rename types
Behdad Esfahbod d5c88af4 2018-11-07T11:20:14 [kerx] More towards sharing Format1
Behdad Esfahbod b693fd0d 2018-11-07T11:05:28 [morx] Simplify
Behdad Esfahbod e890753e 2018-11-07T10:58:50 [morx] Minor