[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).
This commit is contained in:
parent
7cce809cb1
commit
5175300fba
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue