diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 0989a8bb4..75a0f568d 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -660,7 +660,10 @@ struct Tag : ULONG DEFINE_NULL_DATA (Tag, " "); /* Glyph index number, same as uint16 (length = 16 bits) */ -typedef USHORT GlyphID; +struct GlyphID : USHORT { + static inline int cmp (const GlyphID *a, const GlyphID *b) { return b->USHORT::cmp (*a); } + inline int cmp (hb_codepoint_t a) const { return (int) a - (int) *this; } +}; /* Script/language-system/feature index */ struct Index : USHORT {