- case gcdSimpleGlyph:
- return (lookupFlags & lfIgnoreBaseGlyphs) != 0;
-
- case gcdLigatureGlyph:
- return (lookupFlags & lfIgnoreLigatures) != 0;
-
- case gcdMarkGlyph:
- {
- if ((lookupFlags & lfIgnoreMarks) != 0) {
- return TRUE;
+ if (!filterCacheValid || filterCache.id != glyphID) {
+ filterCache.id = glyphID;
+
+ le_bool &filterResult = filterCache.result; // NB: Making this a reference to accept the updated value, in case
+ // we want more fancy cacheing in the future.
+ if (LE_GET_GLYPH(glyphID) >= 0xFFFE) {
+ filterResult = TRUE;
+ } else {
+ LEErrorCode success = LE_NO_ERROR;
+ le_int32 glyphClass = gcdNoGlyphClass;
+ if (glyphClassDefinitionTable.isValid()) {
+ glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphClassDefinitionTable, glyphID, success);