src/hb-aat-layout-common.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 4353192d 2023-04-21T11:59:15 [aat] Tweak a couple sanitize calls that are never called
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 a70543da 2023-01-10T11:49:48 [aat] Always unsafe-to-concat in state machine
Behdad Esfahbod e28c158c 2023-01-10T11:03:38 [aat] Run subtable across ranges if flags match
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 1e503f58 2022-07-05T15:44:58 [null] Add DECLARE_NULL_NAMESPACE_BYTES_TEMPLATE1
Behdad Esfahbod 534b0911 2022-07-01T16:20:31 [aat-layout] Add an unlikely()
Behdad Esfahbod c69ec6f5 2022-06-29T16:32:30 [kern2] Fix sanitize issue on 32bit systems Fixes https://github.com/harfbuzz/harfbuzz/issues/3483
Behdad Esfahbod bea5369c 2022-01-04T10:52:05 [buffer] Rename swap_buffers() to sync()
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 5639e253 2021-03-31T16:04:43 Add Array16Of<>
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.
Behdad Esfahbod 29708e95 2021-03-22T15:22:15 [aat] Fix offsetToIndex math for out-of-bounds values Previously, some bad font data was accidentally being interpretted as legit if it happened to not fall out of memory bounds. The intention of the code was what this commit does. I'm surprised we weren't getting a "arithmetic between signed and unsigned values" warning / error before.
Behdad Esfahbod 8450f43a 2021-03-15T15:18:06 [buffer] HB_NODISCARD next_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
Behdad Esfahbod 9fcba109 2020-06-28T20:30:39 [buffer] Make swap_buffers() copy rest
Behdad Esfahbod d8ea552d 2021-02-18T12:07:46 [aat] Improve unsafe-to-break logic Reduces false-positives. See comments for new logic. Fixes https://github.com/harfbuzz/harfbuzz/issues/2860 Adjusts run-tests.sh to allow unhashed absolute filenames.
Behdad Esfahbod cf203936 2021-02-18T12:03:26 [aat] Unbreak builds Some compilers don't like this: ../src/hb-aat-layout-common.hh:732:9: error: declaration of 'using StateTable = struct AAT::StateTable<Types, EntryData>' changes meaning of 'StateTable' [-fpermissive] 732 | using StateTable = StateTable<Types, EntryData>;
Behdad Esfahbod b6fdaa69 2021-02-18T11:16:37 [minor:aat] Use injected class name
Behdad Esfahbod e27420bb 2021-02-18T11:15:25 [minor:aat] Simplify template reference
Behdad Esfahbod 7b8a8adb 2021-02-18T09:47:24 [aat] Fix unsafe-to-break marking when end-of-text action kicks in The state we are dealing with here is the previous state; so it should cause unsafe_to_break before current glyph. I'm surprised this wasn't caught by any tests. Guess we don't have any fonts with fancy end-of-text forms.
Behdad Esfahbod aa80c7c8 2021-02-18T09:31:46 [aat] Add buffer->successful check before buffer->next_glyph()
Behdad Esfahbod 1535440b 2020-06-19T08:30:59 [dispatch] Fix debug builds
Ebrahim Byagowi 2dda6dd7 2020-04-20T14:12:45 minor, tweak spacing turn 8 spaces to tab, add space before Null/Crap
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.
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 c14efb8e 2019-05-05T09:54:58 Fix previous commit Priority should be given to specific over dispatch. Broke sanitize before. This fixes it, by moving prioritization to the context implementation, since the correct priority cannot be done in the dispatch implementation. Done for subset and sanitize only, which need it.
Behdad Esfahbod ac350c92 2019-05-05T09:10:46 [dispatch] Try obj.dispatch(c) before trying c->dispatch(obj)
Ebrahim Byagowi 92588782 2019-04-30T13:05:10 Remove space between right angle brackets now that we have C++11 (#1689)
Behdad Esfahbod 175bdad8 2019-04-23T23:57:11 One more variadic parameter pack use
Behdad Esfahbod ea281aa8 2019-03-26T16:18:03 Use class templates for Null objects This allows partial-instantiating custom Null object for template Lookup<T>. Before, this had to be handcoded per instantiation. Apparently I missed adding one for AAT::ankr.lookupTable, so it was getting the wrong (generic) null for Lookup object, which is wrong and unsafe. Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=944346
Behdad Esfahbod ec2a5dc8 2019-03-26T16:18:03 Use class templates for Null objects This allows partial-instantiating custom Null object for template Lookup<T>. Before, this had to be handcoded per instantiation. Apparently I missed adding one for AAT::ankr.lookupTable, so it was getting the wrong (generic) null for Lookup object, which is wrong and unsafe. Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=944346
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 e234bb6a 2019-01-24T17:23:11 [AAT] Ignore machine errors and continue
Behdad Esfahbod 1ec90514 2019-01-24T17:21:41 [AAT] Minor
Behdad Esfahbod 299eca0c 2019-01-24T17:17:00 [AAT] Handle out-of-bounds classes
Behdad Esfahbod c4623db4 2019-01-24T17:10:12 [AAT] Minor
Behdad Esfahbod c4e36f97 2019-01-24T17:06:16 [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 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 271cb7c1 2019-01-22T12:05:35 Make some enum constants unsigned
Behdad Esfahbod 7e6bd510 2019-01-17T18:24:18 Use NNOffsetTo<> in rest of places
Behdad Esfahbod c99d13d8 2019-01-17T17:56:27 [AAT] Comment
Behdad Esfahbod 347ad454 2019-01-17T17:47:29 [AAT] Remove unused code
Behdad Esfahbod d25a2f14 2018-12-23T20:19:52 Fix a few warnings
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)
Ebrahim Byagowi 7ee5c523 2018-12-12T15:14:37 minor style fix, use void in methods on no argument
Ebrahim Byagowi 47cf9a96 2018-12-08T10:20:25 Apply non-controversial parts of ot-style (#1464) Things to be used in https://github.com/harfbuzz/harfbuzz/pull/1459
Behdad Esfahbod 84efe043 2018-12-02T12:38:53 [aat] Fix division sign fallout Happened after 11d2f49af8f53340134c844173f4d8655b00dea3 since now nClasses is unsigned int...
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 f9a9c0fd 2018-11-28T14:51:56 [kerx] Fix ClassTable implementation for 'kern' table Format 2
Behdad Esfahbod 5b4a789c 2018-11-28T14:46:26 [aat] Towards adding two ClassTable's
Behdad Esfahbod 3d309726 2018-11-24T23:12:28 [aat] Skip terminator in VarSizedBinSearchArray<> Fixes shaping with Apple Chancery on 10.13 again. In that font, there was a terminator segment, that was tripping off sanitize().
Behdad Esfahbod ba38378f 2018-11-24T00:27:57 [aat] Minor
Behdad Esfahbod 3b9fd176 2018-11-22T01:18:55 Disallow taking Null() of unbounded structs Not sure I've marked all such structs. To be done as we discover. Fixes https://github.com/harfbuzz/harfbuzz/issues/1300
Behdad Esfahbod c221dc0b 2018-11-14T14:49:34 [ot-shape] Move code around
Behdad Esfahbod e014405a 2018-11-12T14:23:31 Rename check_array(array, a, b) to check_range()
Ebrahim Byagowi b8b00fb3 2018-11-08T18:53:14 [aat] Support Lookup<OffsetTo<>>, needed by just and lcar (#1368)
Behdad Esfahbod 006386be 2018-11-07T18:04:53 [kern] Implement negative state numbers Let the fuzzing bots rip this code apart...
Behdad Esfahbod 19090722 2018-11-07T16:42:16 [aat] Add debug info to state machine
Behdad Esfahbod d5c0ca21 2018-11-07T12:08:44 [aat] Minor
Behdad Esfahbod 241ba7da 2018-11-07T11:51:40 [morx/kerx] Rename types
Behdad Esfahbod b11830c0 2018-11-06T15:23:18 [kern] Improve Format 2 Still disabled.
Behdad Esfahbod c0383c6b 2018-11-06T15:07:19 Minor
Behdad Esfahbod b605db2f 2018-11-04T12:58:02 [aat] Clean up ankr table include mess
Behdad Esfahbod 17335a81 2018-11-04T02:25:07 Clean up buffer->swap_buffers() calls That function checks for buffer->successful already. No need to check at call site.
Behdad Esfahbod 36e90ef5 2018-10-31T15:09:09 [mort] Massage some more
Behdad Esfahbod 11dbf0f1 2018-10-30T21:49:59 [mort] More fixes]
Behdad Esfahbod 0cf282a3 2018-10-30T20:51:44 [mort] Grind some more
Behdad Esfahbod c2527a1b 2018-10-30T19:26:16 [mort] Make it compile / hook it up Untested.
Ebrahim Byagowi b053caba 2018-10-30T18:41:34 [mort] Bring back mort generalizations Started by reverting https://github.com/harfbuzz/harfbuzz/commit/1f1c85a5 Just a starting point, if we agree even mort can come back.
Behdad Esfahbod 39bd07ae 2018-10-26T21:01:11 Fix bunch of unused parameter warnings Show up with gcc -O0. There's a few more but those are functions that need to be filled in. Maybe this is a lost battle...
Behdad Esfahbod 1bb8ed86 2018-10-25T17:33:48 [aat] Minor
Behdad Esfahbod 102af615 2018-10-25T17:29:32 [aat] Start adding support for DELETED-GLYPH https://github.com/harfbuzz/harfbuzz/issues/1302
Behdad Esfahbod 00fdbca4 2018-10-20T12:04:51 [aat] Fix LookupFormat10 sanitize Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11060
Behdad Esfahbod f7c0b431 2018-10-19T15:23:49 [aat] Implement LookupFormat10
Behdad Esfahbod 270a37c3 2018-10-17T22:42:47 Kick bots
Behdad Esfahbod 83780308 2018-10-17T22:34:16 [aat] Fix sanitize slowdown Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11034
Behdad Esfahbod 9e8a9b84 2018-10-17T21:41:25 [aat] Another try at fixing Lookup null objects... Ugly as hell, and don't even understand why some bits are needed. But the logic is sound.
Behdad Esfahbod 25fe7e7e 2018-10-16T18:22:54 [aat] Comment
Behdad Esfahbod 87205ef9 2018-10-16T15:40:44 [aat] Make sure Lookup offset is never nulled It has unbounded size... Fixes https://oss-fuzz.com/v2/testcase-detail/5718889451749376
Behdad Esfahbod 7efa3825 2018-10-14T19:30:44 [aat] More protection against buffer fail
Behdad Esfahbod 44af1f93 2018-10-14T14:52:17 [aat] Whitespace
Behdad Esfahbod 2c824d36 2018-10-11T16:41:01 [aat] Fix two wrongs that made a right before! Unfortunately our static asserts (DEFINE_SIZE_STATIC) don't actually fail when used in templates, thanks to SFINAE. Le sighs. Probably fixes https://oss-fuzz.com/v2/testcase-detail/5740171484463104
Behdad Esfahbod e940530c 2018-10-11T15:56:17 [aat] Fix mul overflow Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10897