*
*/
+
/*
* Script, ScriptList, LangSys, Feature, FeatureList, Lookup, LookupList
*/
private:
inline unsigned int get_coverage (hb_codepoint_t glyph_id) const {
- GlyphID gid;
- if (HB_UNLIKELY (glyph_id > 65535))
+ if (HB_UNLIKELY (glyph_id > 0xFFFF))
return NOT_COVERED;
+ GlyphID gid;
gid = glyph_id;
// TODO: bsearch
unsigned int num_glyphs = glyphArray.len;
private:
inline unsigned int get_coverage (hb_codepoint_t glyph_id) const {
if (glyph_id >= start && glyph_id <= end)
- return startCoverageIndex + (glyph_id - start);
+ return (unsigned int) startCoverageIndex + (glyph_id - start);
return NOT_COVERED;
}
// TODO: bsearch
unsigned int count = rangeRecord.len;
for (unsigned int i = 0; i < count; i++) {
- int coverage = rangeRecord[i].get_coverage (glyph_id);
- if (coverage >= 0)
+ unsigned int coverage = rangeRecord[i].get_coverage (glyph_id);
+ if (coverage != NOT_COVERED)
return coverage;
}
return NOT_COVERED;
#define NO_INDEX ((unsigned int) 0xFFFF)
-#define NO_CONTEXT ((unsigned int) -0x20000)
-#define NOT_COVERED ((unsigned int) -1)
-#define MAX_NESTING_LEVEL 32
+#define NO_CONTEXT ((unsigned int) 0x110000)
+#define NOT_COVERED ((unsigned int) 0x110000)
+#define MAX_NESTING_LEVEL 8
/*