[layout] Fix comparison of GlyphID and hb_codepoint_t Before, the IntType::cmp functions providing this and was truncating the hb_codepoint_t to 16bits before comparison. I have no idea how this was never discovered, and I'm too lazy to try to reproduce this with Pango (which uses non-16bit codepoint numbers for missing glyphs).
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 0989a8b..75a0f56 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh
@@ -660,7 +660,10 @@ 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 {