diff --git a/src/hb-ot-face.hh b/src/hb-ot-face.hh index 4a36a4dcb..13c3a96da 100644 --- a/src/hb-ot-face.hh +++ b/src/hb-ot-face.hh @@ -40,6 +40,7 @@ #define HB_OT_TABLES \ /* OpenType fundamentals. */ \ + HB_OT_TABLE(OT, head) \ HB_OT_ACCELERATOR(OT, cmap) \ HB_OT_ACCELERATOR(OT, hmtx) \ HB_OT_ACCELERATOR(OT, vmtx) \ diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index 42bb03ff8..4fdbced4a 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -235,16 +235,11 @@ struct glyf { memset (this, 0, sizeof (accelerator_t)); - hb_blob_t *head_blob = hb_sanitize_context_t().reference_table
(face); - const head *head_table = head_blob->as (); - if (head_table->indexToLocFormat > 1 || head_table->glyphDataFormat != 0) - { + const OT::head &head = *face->table.head; + if (head.indexToLocFormat > 1 || head.glyphDataFormat != 0) /* Unknown format. Leave num_glyphs=0, that takes care of disabling us. */ - hb_blob_destroy (head_blob); return; - } - short_offset = 0 == head_table->indexToLocFormat; - hb_blob_destroy (head_blob); + short_offset = 0 == head.indexToLocFormat; loca_table = hb_sanitize_context_t().reference_table