// Cache the iterator result as it will be iterated multiple times // by the serialize code below.
hb_sorted_vector_t<hb_codepoint_t> glyphs (it);
Coverage_serialize (c->serializer, glyphs.iter ());
return_trace (bool (glyphs));
}
bool intersects (const hb_set_t *glyphs) const
{ switch (u.format)
{ case 1: return u.format1.intersects (glyphs); case 2: return u.format2.intersects (glyphs); #ifndef HB_NO_BEYOND_64K case 3: return u.format3.intersects (glyphs); case 4: return u.format4.intersects (glyphs); #endif default:returnfalse;
}
} bool intersects_coverage (const hb_set_t *glyphs, unsignedint index) const
{ switch (u.format)
{ case 1: return u.format1.intersects_coverage (glyphs, index); case 2: return u.format2.intersects_coverage (glyphs, index); #ifndef HB_NO_BEYOND_64K case 3: return u.format3.intersects_coverage (glyphs, index); case 4: return u.format4.intersects_coverage (glyphs, index); #endif default:returnfalse;
}
}
/* Might return false if array looks unsorted.
* Used for faster rejection of corrupt data. */ template <typename set_t> bool collect_coverage (set_t *glyphs) const
{ switch (u.format)
{ case 1: return u.format1.collect_coverage (glyphs); case 2: return u.format2.collect_coverage (glyphs); #ifndef HB_NO_BEYOND_64K case 3: return u.format3.collect_coverage (glyphs); case 4: return u.format4.collect_coverage (glyphs); #endif default:returnfalse;
}
}
hb_codepoint_t get_glyph () const
{ switch (format)
{ case 1: return u.format1.get_glyph (); case 2: return u.format2.get_glyph (); #ifndef HB_NO_BEYOND_64K case 3: return u.format3.get_glyph (); case 4: return u.format4.get_glyph (); #endif default:return 0;
}
} booloperator != (const iter_t& o) const
{ if (unlikely (format != o.format)) returntrue; switch (format)
{ case 1: return u.format1 != o.u.format1; case 2: return u.format2 != o.u.format2; #ifndef HB_NO_BEYOND_64K case 3: return u.format3 != o.u.format3; case 4: return u.format4 != o.u.format4; #endif default:returnfalse;
}
}
iter_t __end__ () const
{
iter_t it = {};
it.format = format; switch (format)
{ case 1: it.u.format1 = u.format1.__end__ (); break; case 2: it.u.format2 = u.format2.__end__ (); break; #ifndef HB_NO_BEYOND_64K case 3: it.u.format3 = u.format3.__end__ (); break; case 4: it.u.format4 = u.format4.__end__ (); break; #endif default: break;
} return it;
}
private: unsignedint format; union { #ifndef HB_NO_BEYOND_64K
CoverageFormat2_4<MediumTypes>::iter_t format4; /* Put this one first since it's larger; helps shut up compiler. */
CoverageFormat1_3<MediumTypes>::iter_t format3; #endif
CoverageFormat2_4<SmallTypes>::iter_t format2; /* Put this one first since it's larger; helps shut up compiler. */
CoverageFormat1_3<SmallTypes>::iter_t format1;
} u;
};
iter_t iter () const { return iter_t (*this); }
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.