Commit Graph

118 Commits

Author SHA1 Message Date
Behdad Esfahbod 5d4b0377b9 Convert unsigned enum class consts to static constexpr
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod 39e1b6d03f Convert boolean enum class consts to static constexpr
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod 271cb7c1c0 Make some enum constants unsigned 2019-01-22 12:17:26 +01:00
Behdad Esfahbod 7e6bd510fc Use NNOffsetTo<> in rest of places 2019-01-17 18:24:18 -05:00
Behdad Esfahbod c99d13d860 [AAT] Comment 2019-01-17 17:56:27 -05:00
Behdad Esfahbod 347ad454b8 [AAT] Remove unused code 2019-01-17 17:47:29 -05:00
Behdad Esfahbod d25a2f1496 Fix a few warnings 2018-12-23 20:34:24 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Ebrahim Byagowi b2ebaa9afa Remove redundant 'inline' from methods (#1483) 2018-12-16 14:08:10 -05:00
Ebrahim Byagowi 7ee5c52345
minor style fix, use void in methods on no argument 2018-12-12 15:14:37 +03:30
Ebrahim Byagowi 47cf9a9633
Apply non-controversial parts of ot-style (#1464)
Things to be used in https://github.com/harfbuzz/harfbuzz/pull/1459
2018-12-08 10:20:25 +03:30
Behdad Esfahbod 84efe0438e [aat] Fix division sign fallout
Happened after 11d2f49af8
since now nClasses is unsigned int...
2018-12-02 12:39:14 -05:00
Behdad Esfahbod 44cbd2ea3d Convert "static const bool" constants to anonymous enum 2018-11-29 14:56:27 -05:00
Behdad Esfahbod 42a2b496e4 [kerx] Fix Format2 index calc again 2018-11-28 15:24:30 -05:00
Behdad Esfahbod f9a9c0fd1e [kerx] Fix ClassTable implementation for 'kern' table Format 2 2018-11-28 14:51:56 -05:00
Behdad Esfahbod 5b4a789ca8 [aat] Towards adding two ClassTable's 2018-11-28 14:49:45 -05:00
Behdad Esfahbod 3d30972699 [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().
2018-11-24 23:12:28 -05:00
Behdad Esfahbod ba38378fd4 [aat] Minor 2018-11-24 00:27:57 -05:00
Behdad Esfahbod 3b9fd176e8 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
2018-11-22 01:18:55 -05:00
Behdad Esfahbod c221dc0ba7 [ot-shape] Move code around 2018-11-14 19:57:19 -05:00
Behdad Esfahbod e014405a21 Rename check_array(array, a, b) to check_range() 2018-11-12 14:23:31 -05:00
Ebrahim Byagowi b8b00fb3c6
[aat] Support Lookup<OffsetTo<>>, needed by just and lcar (#1368) 2018-11-08 18:53:14 +03:30
Behdad Esfahbod 006386be3a [kern] Implement negative state numbers
Let the fuzzing bots rip this code apart...
2018-11-07 18:04:53 -05:00
Behdad Esfahbod 1909072235 [aat] Add debug info to state machine 2018-11-07 16:42:16 -05:00
Behdad Esfahbod d5c0ca210f [aat] Minor 2018-11-07 12:08:44 -05:00
Behdad Esfahbod 241ba7da51 [morx/kerx] Rename types 2018-11-07 11:51:40 -05:00
Behdad Esfahbod b11830c09e [kern] Improve Format 2
Still disabled.
2018-11-06 17:59:31 -05:00
Behdad Esfahbod c0383c6bb7 Minor 2018-11-06 17:59:31 -05:00
Behdad Esfahbod b605db2f65 [aat] Clean up ankr table include mess 2018-11-04 12:58:02 -05:00
Behdad Esfahbod 17335a8161 Clean up buffer->swap_buffers() calls
That function checks for buffer->successful already.  No need
to check at call site.
2018-11-04 02:25:07 -05:00
Behdad Esfahbod 36e90ef56e [mort] Massage some more 2018-10-31 15:09:09 -07:00
Behdad Esfahbod 11dbf0f129 [mort] More fixes] 2018-10-30 21:49:59 -07:00
Behdad Esfahbod 0cf282a32e [mort] Grind some more 2018-10-30 20:52:12 -07:00
Behdad Esfahbod c2527a1bc2 [mort] Make it compile / hook it up
Untested.
2018-10-30 19:26:39 -07:00
Ebrahim Byagowi b053cabacd [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.
2018-10-30 19:18:06 -07:00
Behdad Esfahbod 39bd07aed5 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...
2018-10-26 21:22:26 -07:00
Behdad Esfahbod 1bb8ed86d6 [aat] Minor 2018-10-25 17:33:48 -07:00
Behdad Esfahbod 102af615f1 [aat] Start adding support for DELETED-GLYPH
https://github.com/harfbuzz/harfbuzz/issues/1302
2018-10-25 17:29:32 -07:00
Behdad Esfahbod 00fdbca4f6 [aat] Fix LookupFormat10 sanitize
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11060
2018-10-20 12:20:57 -07:00
Behdad Esfahbod f7c0b4319c [aat] Implement LookupFormat10 2018-10-19 15:23:49 -07:00
Behdad Esfahbod 270a37c324 Kick bots 2018-10-17 22:42:47 -07:00
Behdad Esfahbod 83780308b4 [aat] Fix sanitize slowdown
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11034
2018-10-17 22:34:16 -07:00
Behdad Esfahbod 9e8a9b846e [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.
2018-10-17 21:45:27 -07:00
Behdad Esfahbod 25fe7e7e10 [aat] Comment 2018-10-16 18:22:54 -07:00
Behdad Esfahbod 87205ef935 [aat] Make sure Lookup offset is never nulled
It has unbounded size...

Fixes https://oss-fuzz.com/v2/testcase-detail/5718889451749376
2018-10-16 15:41:00 -07:00
Behdad Esfahbod 7efa38257b [aat] More protection against buffer fail 2018-10-14 19:30:44 -07:00
Behdad Esfahbod 44af1f93ee [aat] Whitespace 2018-10-14 14:52:17 -07:00
Behdad Esfahbod 2c824d3644 [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
2018-10-11 16:43:05 -04:00
Behdad Esfahbod e940530c97 [aat] Fix mul overflow
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10897
2018-10-11 15:56:17 -04:00
Behdad Esfahbod d6a12dba6d [trak] Fix, and hook up
Works beautifully!  Test coming.
2018-10-11 11:10:06 -04:00
Behdad Esfahbod 1622ba5943 [kerx] Implement Format4 'ankr'-based mark attachment
Tested with Kannada MN:

$ HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0CCD,0C95,0CD6
[kn_ka.vattu=0+230|kn_ai_length_mark=1@326,0+607]
2018-10-11 01:17:33 -04:00
Behdad Esfahbod 7bb4da7d95 [aat] Wire up 'ankr' table to apply context 2018-10-11 00:52:07 -04:00
Behdad Esfahbod 7727e73756 [kerx] Actually hook up, and fix crash 2018-10-10 13:24:51 -04:00
Behdad Esfahbod d35315cc02 [aat] Fixup recent commit
For 329f240108

max_ops is signed.
2018-10-09 23:17:32 -04:00
Behdad Esfahbod 329f240108 [aat] Set embedded sanitizer max ops really high
Since we consume it legitimately during shaping.
2018-10-09 23:03:20 -04:00
Behdad Esfahbod 53e5594500 [kerx] Implement Format0 apply()
Not hooked up to be called yet.
2018-10-09 22:35:22 -04:00
Behdad Esfahbod 456a68c506 Move code 2018-10-07 22:28:45 -04:00
Behdad Esfahbod 3515c8b187 [aat] Rename 2018-10-07 22:27:00 -04:00
Behdad Esfahbod 7ee50af836 [morx] Fix memory access issues with unsafe_to_break 2018-10-06 21:31:44 +02:00
Behdad Esfahbod 4831e615d1 [morx] Fix memory access issue
If buffer was enlarged, info was being outdated.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1225
2018-10-05 18:14:13 +02:00
Behdad Esfahbod 98ac01d3b3 [morx] Break out if buffer gets into error
Was getting stuck not making progress somehow.
2018-10-01 12:10:00 +02:00
Behdad Esfahbod 0739b28169 [aat] Minor 2018-09-19 17:32:21 -04:00
Behdad Esfahbod 10642b3fbf Disallow null-enabled offsets to unsized structures...
...like UnsizedArrayOf<>.

This fixes a class of crasher bugs, mostly with color and AAT tables.  We
cannot use nullable offsets to varsized data that does not declare min_size,
because it's nost safe to use our fixed-size null pool for types that have
their size external.  So, use non_null'able offsets for these.

A further enhancement would be to make use of min_size in Null<> itself.
Will try that after.
2018-09-15 19:43:33 +02:00
Behdad Esfahbod 957dbed388 Fix builds 2018-09-14 12:14:42 +02:00
Behdad Esfahbod 4653e6cf3c [aat] Add enums for pre-defined state and classes
Not sure how I didn't add before...
2018-09-14 11:31:33 +02:00
Behdad Esfahbod dff2c45f1e Port rest from VAR to UnsizedArrayOf<> 2018-09-11 01:01:08 +02:00
Behdad Esfahbod 9507b05a7a Simplify sanitize->check_array()
Fix a bug in CBDT sanitize, and redundant check in avar.
2018-09-10 23:18:23 +02:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00