From 2449eb088275ef10009bdff1a5809c56f2c0dd63 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 12 Mar 2025 21:03:24 -0600 Subject: [PATCH] [aat] Adjust filtering to match collect_glyphs() --- src/hb-aat-layout-common.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 55d2975a4..1d9c6f0fe 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -235,6 +235,7 @@ struct LookupSegmentSingle template void collect_glyphs_filtered (set_t &glyphs, const filter_t &filter) const { + if (first == DELETED_GLYPH) return; if (!filter (value)) return; glyphs.add_range (first, last); } @@ -324,6 +325,7 @@ struct LookupSegmentArray template void collect_glyphs_filtered (set_t &glyphs, const void *base, const filter_t &filter) const { + if (first == DELETED_GLYPH) return; const auto &values = base+valuesZ; for (hb_codepoint_t i = first; i <= last; i++) if (filter (values[i - first])) @@ -424,6 +426,7 @@ struct LookupSingle template void collect_glyphs_filtered (set_t &glyphs, const filter_t &filter) const { + if (glyph == DELETED_GLYPH) return; if (!filter (value)) return; glyphs.add (glyph); }