diff --git a/src/OT/Layout/GPOS/AnchorMatrix.hh b/src/OT/Layout/GPOS/AnchorMatrix.hh index dff409c8e..2557e9a72 100644 --- a/src/OT/Layout/GPOS/AnchorMatrix.hh +++ b/src/OT/Layout/GPOS/AnchorMatrix.hh @@ -68,15 +68,14 @@ struct AnchorMatrix if (unlikely (!c->serializer->extend_min (out))) return_trace (false); out->rows = num_rows; - bool ret = false; for (const unsigned i : index_iter) { auto *offset = c->serializer->embed (matrixZ[i]); if (!offset) return_trace (false); - ret |= offset->serialize_subset (c, matrixZ[i], this); + offset->serialize_subset (c, matrixZ[i], this); } - return_trace (ret); + return_trace (true); } }; diff --git a/test/subset/data/Makefile.am b/test/subset/data/Makefile.am index 9a7d08ce0..3e396d584 100644 --- a/test/subset/data/Makefile.am +++ b/test/subset/data/Makefile.am @@ -73,6 +73,7 @@ EXTRA_DIST += \ expected/collect_name_ids \ expected/instantiate_colrv1 \ expected/instantiate_cff2_update_metrics \ + expected/layout.empty_ligature_offset \ fonts \ profiles \ $(NULL) diff --git a/test/subset/data/Makefile.sources b/test/subset/data/Makefile.sources index 398f2b82a..a079ec554 100644 --- a/test/subset/data/Makefile.sources +++ b/test/subset/data/Makefile.sources @@ -64,6 +64,7 @@ TESTS = \ tests/collect_name_ids.tests \ tests/instantiate_colrv1.tests \ tests/instantiate_cff2_update_metrics.tests \ + tests/layout.empty_ligature_offset.tests \ $(NULL) # TODO: re-enable once colrv1 subsetting is stabilized. diff --git a/test/subset/data/expected/layout.empty_ligature_offset/AnekBangla-latin-subset.default.retain-all-codepoint.ttf b/test/subset/data/expected/layout.empty_ligature_offset/AnekBangla-latin-subset.default.retain-all-codepoint.ttf new file mode 100644 index 000000000..e940516bf Binary files /dev/null and b/test/subset/data/expected/layout.empty_ligature_offset/AnekBangla-latin-subset.default.retain-all-codepoint.ttf differ diff --git a/test/subset/data/fonts/AnekBangla-latin-subset.ttf b/test/subset/data/fonts/AnekBangla-latin-subset.ttf new file mode 100644 index 000000000..e940516bf Binary files /dev/null and b/test/subset/data/fonts/AnekBangla-latin-subset.ttf differ diff --git a/test/subset/data/tests/layout.empty_ligature_offset.tests b/test/subset/data/tests/layout.empty_ligature_offset.tests new file mode 100644 index 000000000..8d504c044 --- /dev/null +++ b/test/subset/data/tests/layout.empty_ligature_offset.tests @@ -0,0 +1,8 @@ +FONTS: +AnekBangla-latin-subset.ttf + +PROFILES: +default.txt + +SUBSETS: +* diff --git a/test/subset/meson.build b/test/subset/meson.build index 3b264c369..38a137360 100644 --- a/test/subset/meson.build +++ b/test/subset/meson.build @@ -66,6 +66,7 @@ tests = [ 'collect_name_ids', 'instantiate_colrv1', 'instantiate_cff2_update_metrics', + 'layout.empty_ligature_offset', ] if get_option('experimental_api')