From c36598450e9698168851c0ae7d0b4c9e562c4924 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 26 Feb 2018 00:57:07 -0800 Subject: [PATCH] [aat/ankr] Simplify --- src/hb-aat-layout-ankr-table.hh | 36 ++++++++------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/src/hb-aat-layout-ankr-table.hh b/src/hb-aat-layout-ankr-table.hh index e64ad0942..8ccaa7e86 100644 --- a/src/hb-aat-layout-ankr-table.hh +++ b/src/hb-aat-layout-ankr-table.hh @@ -37,25 +37,6 @@ namespace AAT { * ankr -- Anchor point */ -struct GlyphDataTable -{ - inline bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && - (numPoints != 0) && - (anchorPoints.sanitize (c, numPoints))); - } - - protected: - HBUINT32 numPoints; /* Number of anchor points for this glyph */ - UnsizedArrayOf anchorPoints; /* Individual anchor points. Each anchor point is a two-byte - * signed x-coordinate followed by a two-byte signed y-coordinate */ - - public: - DEFINE_SIZE_ARRAY (4, anchorPoints); -}; - struct ankr { static const hb_tag_t tableTag = HB_AAT_TAG_ankr; @@ -63,18 +44,17 @@ struct ankr inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && - (version == 0) && - (flags == 0) && - (lookupTableOffset == 0x0000000C) && - (glyphDataTableOffset.sanitize (c, this))); + return_trace (c->check_struct (this) && version == 0 && + /* XXX lookupTable */ + anchors.sanitize (c, this)); } protected: - HBUINT16 version; /* Version number (set to zero) */ - HBUINT16 flags; /* Flags (currently unused; set to zero) */ - LOffsetTo lookupTableOffset; /* Offset to the table's lookup table */ - LOffsetTo glyphDataTableOffset; /* Offset to the glyph data table */ + HBUINT16 version; /* Version number (set to zero) */ + HBUINT16 flags; /* Flags (currently unused; set to zero) */ + LOffsetTo lookupTable; /* Offset to the table's lookup table */ + LOffsetTo > + anchors; /* Offset to the glyph data table */ public: DEFINE_SIZE_MIN (12);