提交 c3659845 编写于 作者: B Behdad Esfahbod

[aat/ankr] Simplify

上级 fa3a69e2
...@@ -37,25 +37,6 @@ namespace AAT { ...@@ -37,25 +37,6 @@ namespace AAT {
* ankr -- Anchor point * 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<HBUINT32> 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 struct ankr
{ {
static const hb_tag_t tableTag = HB_AAT_TAG_ankr; static const hb_tag_t tableTag = HB_AAT_TAG_ankr;
...@@ -63,18 +44,17 @@ struct ankr ...@@ -63,18 +44,17 @@ struct ankr
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && return_trace (c->check_struct (this) && version == 0 &&
(version == 0) && /* XXX lookupTable */
(flags == 0) && anchors.sanitize (c, this));
(lookupTableOffset == 0x0000000C) &&
(glyphDataTableOffset.sanitize (c, this)));
} }
protected: protected:
HBUINT16 version; /* Version number (set to zero) */ HBUINT16 version; /* Version number (set to zero) */
HBUINT16 flags; /* Flags (currently unused; set to zero) */ HBUINT16 flags; /* Flags (currently unused; set to zero) */
LOffsetTo<const void*> lookupTableOffset; /* Offset to the table's lookup table */ LOffsetTo<const void*> lookupTable; /* Offset to the table's lookup table */
LOffsetTo<GlyphDataTable> glyphDataTableOffset; /* Offset to the glyph data table */ LOffsetTo<ArrayOf<HBUINT32, HBUINT32> >
anchors; /* Offset to the glyph data table */
public: public:
DEFINE_SIZE_MIN (12); DEFINE_SIZE_MIN (12);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册