From 15905a2a2998f7ddd964f920a4828602235d6b00 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 24 Nov 2018 17:14:39 -0500 Subject: [PATCH] [aat.kerx] Remove kerx subtable boundary enforcement Have not encountered fonts needing this, but same reasoning as for morx (see previos commit.) --- src/hb-aat-layout-kerx-table.hh | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index fbeb35b0c..b5c1e1d1f 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -926,12 +926,6 @@ struct KerxTable if (reverse) c->buffer->reverse (); - /* See comment in sanitize() for conditional here. */ - if (i < count - 1) - c->sanitizer.set_object (*st); - else - c->sanitizer.reset_object (); - ret |= st->dispatch (c); if (reverse) @@ -943,7 +937,6 @@ struct KerxTable st = &StructAfter (*st); c->set_lookup_index (c->lookup_index + 1); } - c->sanitizer.reset_object (); return ret; } @@ -962,24 +955,10 @@ struct KerxTable unsigned int count = thiz()->tableCount; for (unsigned int i = 0; i < count; i++) { - c->reset_object (); - if (unlikely (!st->u.header.sanitize (c))) - return_trace (false); - /* OpenType kern table has 2-byte subtable lengths. That's limiting. - * MS implementation also only supports one subtable, of format 0, - * anyway. Certain versions of some fonts, like Calibry, contain - * kern subtable that exceeds 64kb. Looks like, the subtable length - * is simply ignored. Which makes sense. It's only needed if you - * have multiple subtables. To handle such fonts, we just ignore - * the length for the last subtable. */ - if (i < count - 1) - c->set_object (*st); - if (unlikely (!st->sanitize (c))) return_trace (false); st = &StructAfter (*st); } - c->reset_object (); return_trace (true); }