diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index cb92f0894..336edf887 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2093,7 +2093,6 @@ struct ClassDefFormat1 for (unsigned i = 0; i < count; i++) if (classValue[i] == klass && glyphs->has (startGlyph + i)) intersect_glyphs->add (startGlyph + i); - return; #if 0 /* The following implementation is faster asymptotically, but slower @@ -2332,6 +2331,19 @@ struct ClassDefFormat2 return; } +#if 0 + /* The following implementation is faster asymptotically, but slower + * in practice. */ + if ((count >> 3) > glyphs->get_population ()) + { + for (hb_codepoint_t g = HB_SET_VALUE_INVALID; + hb_set_next (glyphs, &g);) + if (rangeRecord.as_array ().bfind (g)) + intersect_glyphs->add (g); + return; + } +#endif + for (unsigned int i = 0; i < count; i++) { if (rangeRecord[i].value != klass) continue;