Commit Graph

96 Commits

Author SHA1 Message Date
Behdad Esfahbod db6e658e8c [kern/kerx] More towards sharing KernTable 2018-11-07 13:33:23 -05:00
Behdad Esfahbod 8e9f6cd0fd [kerx] More minor 2018-11-07 12:49:20 -05:00
Behdad Esfahbod f8c3df7d4a [kern/kerx] Minor 2018-11-07 12:48:06 -05:00
Behdad Esfahbod f5e0a63a22 [kern/kerx] Towards sharing KernTable 2018-11-07 12:32:51 -05:00
Behdad Esfahbod 330508497d [kern/kerx] Minor 2018-11-07 12:27:44 -05:00
Behdad Esfahbod 1a5ef84900 [kern/kerx] Share Format2
This, enables Format2 for kern table, which was disabled before.
2018-11-07 12:19:52 -05:00
Behdad Esfahbod 8faec4e334 [kerx] Towards merging Format2 2018-11-07 12:16:38 -05:00
Behdad Esfahbod e72e041c3c [kerx] Rename 2018-11-07 11:56:36 -05:00
Behdad Esfahbod 241ba7da51 [morx/kerx] Rename types 2018-11-07 11:51:40 -05:00
Behdad Esfahbod c808e444da [kern/kerx] Share Format1 subtable 2018-11-07 11:47:12 -05:00
Behdad Esfahbod a244190afa [kerx] Minor 2018-11-07 11:47:12 -05:00
Behdad Esfahbod 2a72091196 [kerx] Minor 2018-11-07 11:26:57 -05:00
Behdad Esfahbod f5f4ca7871 [kern/kerx] Enable crossStream kerning in vertical
CoreText doesn't, but no reason we shouldn't do.
2018-11-07 11:21:09 -05:00
Behdad Esfahbod d5c88af4a2 [kerx] More towards sharing Format1 2018-11-07 11:20:14 -05:00
Behdad Esfahbod ce3451dc2a [kerx] Towards sharing Format1 2018-11-07 11:02:04 -05:00
Behdad Esfahbod 5b17853547 [kern/kerx] Share Format0 2018-11-07 10:45:25 -05:00
Behdad Esfahbod c97dde5d55 [kern/kerx] Towards merge more 2018-11-07 10:39:39 -05:00
Behdad Esfahbod 540ccc38b0 [kern/kerx] More towards sharing 2018-11-07 10:33:46 -05:00
Behdad Esfahbod d0f8f4c200 [kern] Move kern machine to hb-kern.hh 2018-11-07 10:25:25 -05:00
Behdad Esfahbod a6acff252c [kerx] Towards sharing subtables with kern 2018-11-07 10:19:57 -05:00
Behdad Esfahbod 59e04e4231 [kern/kerx] Fix cursive joining
Tested with Waseem TTC:

$ hb-shape Waseem.ttc جحخج
[F1Jeem_R2=3@0,180+479|M1Khah_L2_R2=2@0,682+403|M1Hah_L2_R2=1@0,1184+403|I1Jeem_L2=0@0,1184+744]
2018-11-07 00:27:20 -05:00
Behdad Esfahbod 8d0f797139 [kern/kerx] Fix "reset" magic value 2018-11-07 00:05:10 -05:00
Behdad Esfahbod 0123976a0c [kerx] Adjust CrossStream kern to match 'kern' table 2018-11-06 21:46:14 -05:00
Behdad Esfahbod 01bf43ac01 [kern] Implement CrossStream kerning 2018-11-06 17:59:31 -05:00
Behdad Esfahbod 220a5991ba [kern/kerx] Fix trace numbering 2018-11-06 17:16:23 -05:00
Behdad Esfahbod bfafe208da [kern] Switch to dispatch 2018-11-06 12:13:20 -05:00
Behdad Esfahbod b605db2f65 [aat] Clean up ankr table include mess 2018-11-04 12:58:02 -05:00
Behdad Esfahbod 8034d1dda0 [kern] Implement Format1
Also, implement backwards kerning for Format1 in kern and kerx.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1350
2018-11-02 14:48:04 -04: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 b713c13977 [kerx] Implement tuple-kerning in Format0 2018-10-20 14:56:28 -07:00
Behdad Esfahbod 68b7050768 [kerx] Fix sanitize of KerxSubtableFormat2::array read
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11033
2018-10-20 12:20:57 -07:00
Behdad Esfahbod 29d877518f [kerx] Implement variation-kerning tables (without the variation part)
SFSNDisplay uses these.  We just apply the default kern without
variations right now.  But at least makes the default kern work.
2018-10-19 16:06:54 -07:00
Behdad Esfahbod 2352cc3539 [kerx] Whitespace 2018-10-19 10:17:02 -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
Ebrahim Byagowi 42b75dc3a7
[kerx] Minor, remove debug bit 2018-10-16 10:58:09 +03:30
Behdad Esfahbod 11703afce6 [kerx] Fix Format6 sanitize
Fixes https://oss-fuzz.com/v2/testcase-detail/5650286710882304
2018-10-15 21:17:08 -07:00
Behdad Esfahbod bb35725cd7 [kerx/morx] More end-of-text protection 2018-10-15 11:05:10 -07:00
Behdad Esfahbod 40f2b9355c [kerx] Fix Format1 sanitize
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10948
2018-10-14 14:56:32 -07:00
Behdad Esfahbod de6e414c56 [kerx] Sanitize more 2018-10-13 13:48:22 -04:00
Behdad Esfahbod 71f76f2f39 [kerx] Fix-up previous commit
A "&" was missing.  Go back to using pointers that are less error-prone.
2018-10-13 13:36:27 -04:00
Behdad Esfahbod 6d4b054234 [kerx] Use sanitizer instead of handcoded runtime sanitization 2018-10-13 12:20:33 -04:00
Behdad Esfahbod 5733113662 [kerx] Wire up context down to get_kerning 2018-10-13 12:16:12 -04:00
Behdad Esfahbod c4502833b7 [kerx] Use sanitizer.get_num_glyphs() instead of face->get_num_glyphs() 2018-10-13 12:09:59 -04:00
Behdad Esfahbod fc45e698f2 [kerx] Protext against overflows 2018-10-13 12:09:59 -04:00
Behdad Esfahbod fbbd926dba [kerx] Implement Format4 action_type=1 contour-point-based attachment
Untested.

This concludes kerx table support!
2018-10-11 01:22:29 -04:00
Behdad Esfahbod b6bc0d4ff6 [kerx] Implement Format4 action_type=2 coordinate-based attachment
Untested.
2018-10-11 01:17:57 -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 28f0367aab [kerx] Flesh out Format4
Doesn't apply actions yet.
2018-10-11 00:46:12 -04:00
Behdad Esfahbod f7c45bc33e [kerx] Allow granularly disabling kerning 2018-10-10 22:15:13 -04:00