Commit Graph

35 Commits

Author SHA1 Message Date
Behdad Esfahbod 0537a40193 [kerx] Comment 2018-10-09 23:37:00 -04:00
Behdad Esfahbod 27db859416 [kern/kerx] Adjust bounds check 2018-10-09 22:55:17 -04:00
Behdad Esfahbod 4df8eb200d [kern] Use kern subtable length for sanitizing in the accelerator 2018-10-09 22:46:12 -04:00
Behdad Esfahbod 8bff1d2994 [kern] Minor 2018-10-09 22:39:31 -04:00
Behdad Esfahbod 210f899aca [kern] Sanitize 4 bytes, not 2 2018-10-09 21:58:04 -04:00
Behdad Esfahbod 977c8a8e5c [kern] Minor 2018-10-09 00:22:08 -04:00
Behdad Esfahbod a51958819f Apply TrueType/OpenType kern table when GPOS kern feature is not available
Fixes https://github.com/harfbuzz/harfbuzz/issues/250
2018-10-08 23:57:45 -04:00
Behdad Esfahbod 3c23ff9b7c [kern] Add kerning driver to TT kern table 2018-10-08 23:26:26 -04:00
Behdad Esfahbod 683c3a9533 [kern] Abstract away kerning machine 2018-10-08 23:09:48 -04:00
Behdad Esfahbod d62b4011cc [kern] Shout less 2018-10-07 22:58:06 -04:00
Behdad Esfahbod 8aa83d97f9 [kern/kerx] Fix Format2 offsetting
"The values in the right class table are stored pre-multiplied by the
number of bytes in a single kerning value, and the values in the left
class table are stored pre-multiplied by the number of bytes in one
row. This eliminates needing to multiply the row and column values
together to determine the location of the kerning value. The array can
be indexed by doing the right- and left-hand class mappings, adding the
class values to the address of the array, and fetching the kerning
value to which the new address points."
2018-10-07 22:45:15 -04: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 3a0b3a29cc Free up hb-ot-face.hh from includes
There might be a better way to do this, but I couldn't find...
2018-08-26 15:11:24 -07: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
Behdad Esfahbod 9583e0077d Port more off of Sanitizer<> 2018-07-22 22:43:25 -07:00
Behdad Esfahbod 2a46a020fd Minor 2018-05-08 02:53:03 -07:00
Behdad Esfahbod eba1c16a60 Always lock blob in sanitize. Remove blob->lock_as() in favor of blob->lock() 2018-05-08 02:47:42 -07:00
Behdad Esfahbod b4fa505014 Move Sanitizer::lock_instance<>() to blob->lock_as<>(). 2018-05-08 02:45:08 -07:00
Ebrahim Byagowi a02c3ee70f Add or update tables specifications links 2018-04-12 13:44:32 +04:30
Ebrahim Byagowi 2a23606339
Fix llvm-gcc-4.2 compile issue and add a macOS bot to test it (#899) 2018-03-23 18:37:01 +04:30
bungeman 85be365ed9 Use KernSubTableFormat2::rightClassTable
Issue originally reported at http://cppfiles.com/chromium.txt .

This fixes what appears to be a copy - paste issue which causes both
KernSubTableFormat2::rightClassTable and the 'right' argument to
KernSubTableFormat2::get_kerning to go unused.
2018-01-26 15:20:18 -08:00
Behdad Esfahbod 6b19178ee3 Prefix int types with HB
Such a headache that Windows defines UINT8, ...; Just prefix it.
2018-01-10 03:07:30 +01:00
Behdad Esfahbod 470fe5b603 [aat] Implement Lookup table
Untested, but compiles.
2018-01-10 02:50:49 +01:00
Behdad Esfahbod 6f335ed1e5 Replace USHORT/SHORT/ULONG/etc with UINT16/INT16/UINT32/etc 2017-11-14 21:06:07 -08:00
Behdad Esfahbod 702d86ba6b [ot] Fold hb_ot_face_kern_accelerator_t 2017-11-14 19:25:51 -08:00
Behdad Esfahbod 8eed9cb11e [kern] Fix invalid memory access if offset is zero
If offset is zero, we return Null() object.  Wasn't prepared for that.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4088
2017-11-09 18:09:40 -08:00
Behdad Esfahbod a615030683 [kern] Implement format-2 kern subtable 2017-11-06 15:40:07 -05:00
Behdad Esfahbod 82a38d1f7a [kern] Allow subtables longer than 64kb
Apparently calibri.ttf does this:
https://github.com/fonttools/fonttools/pull/1094#discussion_r148933791
2017-11-06 15:28:24 -05:00
Behdad Esfahbod 625ae08fce [kern] Towards implementing format-2 2017-11-06 15:06:30 -05:00
Behdad Esfahbod 77acc1106e [kern] More...
Almost there.
2017-11-01 19:40:51 -06:00
Behdad Esfahbod 49c0f35580 [kern] See if this helps with making VS bot happy 2017-11-01 18:16:07 -06:00
Behdad Esfahbod 4c43a23bf4 [kern] Implement Format0 2017-11-01 18:12:26 -06:00
Behdad Esfahbod ac3d937c6c [kern] Implement some more 2017-11-01 17:54:56 -06:00
Behdad Esfahbod 2a16f647ae [kern] Start implementing kern table
Pushing this out early to catch bot errors since I'm using template tricks
we were not using in HarfBuzz before.
2017-11-01 17:32:34 -06:00