From 60d6ffb3758fddca681cfc28828175eb8b5aa3e6 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 3 Aug 2022 21:01:23 +0000 Subject: [PATCH] [repacker] always duplicate classDef2 when splitting a PairPos2. Splits are done in a way that it shouldn't be possible to share the classDef2 between split PairPos2's so pre-emptively duplicate it. --- src/graph/pairpos-graph.hh | 1 + src/test-repacker.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graph/pairpos-graph.hh b/src/graph/pairpos-graph.hh index 76684d2cc..f8c315d14 100644 --- a/src/graph/pairpos-graph.hh +++ b/src/graph/pairpos-graph.hh @@ -381,6 +381,7 @@ struct PairPosFormat2 : public OT::Layout::GPOS_impl::PairPosFormat2_4objidx = class_def_2_id; class_def_link->position = 10; split_context.c.graph.vertices_[class_def_2_id].parents.push (pair_pos_prime_id); + split_context.c.graph.duplicate (pair_pos_prime_id, class_def_2_id); return pair_pos_prime_id; } diff --git a/src/test-repacker.cc b/src/test-repacker.cc index eefb46efd..f6863ece8 100644 --- a/src/test-repacker.cc +++ b/src/test-repacker.cc @@ -1211,7 +1211,7 @@ populate_serializer_with_large_pair_pos_2 (hb_serialize_context_t* c, 5 + num_class_1 - 1, c); - pair_pos_2[i] = add_pair_pos_2 (i * num_class_1, + pair_pos_2[i] = add_pair_pos_2 (1 + i * num_class_1, coverage[i], class_def_1[i], num_class_1, class_def_2[i], num_class_2,