diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 1b3dc118d..a9f64460f 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -1250,10 +1250,11 @@ static void context_closure_recurse_lookups (hb_closure_context_t *c, unsigned seqIndex = lookupRecord[i].sequenceIndex; if (seqIndex >= inputCount) continue; - hb_set_t *pos_glyphs = hb_set_create (); + hb_set_t *pos_glyphs = nullptr; if (hb_set_is_empty (covered_seq_indicies) || !hb_set_has (covered_seq_indicies, seqIndex)) { + pos_glyphs = hb_set_create (); if (seqIndex == 0) { switch (context_format) { @@ -1283,7 +1284,8 @@ static void context_closure_recurse_lookups (hb_closure_context_t *c, } hb_set_add (covered_seq_indicies, seqIndex); - c->push_cur_active_glyphs (pos_glyphs); + if (pos_glyphs) + c->push_cur_active_glyphs (pos_glyphs); unsigned endIndex = inputCount; if (context_format == ContextFormat::CoverageBasedContext) @@ -1291,8 +1293,10 @@ static void context_closure_recurse_lookups (hb_closure_context_t *c, c->recurse (lookupRecord[i].lookupListIndex, covered_seq_indicies, seqIndex, endIndex); - c->pop_cur_done_glyphs (); - hb_set_destroy (pos_glyphs); + if (pos_glyphs) { + c->pop_cur_done_glyphs (); + hb_set_destroy (pos_glyphs); + } } hb_set_destroy (covered_seq_indicies); diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644,623,62D,644,627,645,2E.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644,623,62D,644,627,645,2E.ttf deleted file mode 100644 index 5702ea407..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644,623,62D,644,627,645,2E.ttf and /dev/null differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644,62D,628.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644,62D,628.ttf deleted file mode 100644 index a444d9e89..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644,62D,628.ttf and /dev/null differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644,62D.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644,62D.ttf new file mode 100644 index 000000000..394d92c36 Binary files /dev/null and b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644,62D.ttf differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644.ttf deleted file mode 100644 index 7404ea076..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.627,644.ttf and /dev/null differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.633,645,627,621,20,644,627.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.633,645,627,621,20,644,627.ttf deleted file mode 100644 index 2d601cfd3..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.633,645,627,621,20,644,627.ttf and /dev/null differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.63A,64A,631.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.63A,64A,631.ttf deleted file mode 100644 index 18bf3ada6..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout-retain-gids.63A,64A,631.ttf and /dev/null differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.627,644,623,62D,644,627,645,2E.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.627,644,623,62D,644,627,645,2E.ttf deleted file mode 100644 index 0d3ee1183..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.627,644,623,62D,644,627,645,2E.ttf and /dev/null differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.627,644,62D,628.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.627,644,62D,628.ttf deleted file mode 100644 index 34245f7f5..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.627,644,62D,628.ttf and /dev/null differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.627,644.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.627,644.ttf deleted file mode 100644 index d5a0c619c..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.627,644.ttf and /dev/null differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.633,645,627,621,20,644,627.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.633,645,627,621,20,644,627.ttf deleted file mode 100644 index cd488e4f2..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.633,645,627,621,20,644,627.ttf and /dev/null differ diff --git a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.63A,64A,631.ttf b/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.63A,64A,631.ttf deleted file mode 100644 index c5635485a..000000000 Binary files a/test/subset/data/expected/layout.notonastaliqurdu/NotoNastaliqUrdu-Bold.keep-layout.63A,64A,631.ttf and /dev/null differ diff --git a/test/subset/data/tests/layout.notonastaliqurdu.tests b/test/subset/data/tests/layout.notonastaliqurdu.tests index cd4479632..a353a1536 100644 --- a/test/subset/data/tests/layout.notonastaliqurdu.tests +++ b/test/subset/data/tests/layout.notonastaliqurdu.tests @@ -2,12 +2,7 @@ FONTS: NotoNastaliqUrdu-Bold.ttf PROFILES: -keep-layout.txt keep-layout-retain-gids.txt SUBSETS: -ال -الأحلام. -غير -سماء لا -الحب +الح