From 89ec095979bde94bd203ed2c394f6e40629e9e78 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 7 Nov 2018 13:10:05 -0500 Subject: [PATCH] [kern] Disable Format1 and Format3 for OT-style tables --- src/hb-ot-kern-table.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-kern-table.hh b/src/hb-ot-kern-table.hh index 693c4f2..0102bb2 100644 --- a/src/hb-ot-kern-table.hh +++ b/src/hb-ot-kern-table.hh @@ -128,9 +128,9 @@ struct KernSubTable TRACE_DISPATCH (this, subtable_type); switch (subtable_type) { case 0: return_trace (c->dispatch (u.format0)); - case 1: return_trace (c->dispatch (u.format1)); + case 1: return_trace (u.header.apple ? c->dispatch (u.format1) : c->default_return_value ()); case 2: return_trace (c->dispatch (u.format2)); - case 3: return_trace (c->dispatch (u.format3)); + case 3: return_trace (u.header.apple ? c->dispatch (u.format3) : c->default_return_value ()); default: return_trace (c->default_return_value ()); } } @@ -238,6 +238,7 @@ struct KernTable struct KernOTSubTableHeader { + static const bool apple = false; typedef AAT::ObsoleteTypes Types; inline unsigned int tuple_count (void) const { return 0; } @@ -288,6 +289,7 @@ struct KernOT : KernTable struct KernAATSubTableHeader { + static const bool apple = true; typedef AAT::ObsoleteTypes Types; inline unsigned int tuple_count (void) const { return 0; } -- 2.7.4