diff --git a/src/hb-subset-cff2.cc b/src/hb-subset-cff2.cc index d2fcdceac..74e39d5ec 100644 --- a/src/hb-subset-cff2.cc +++ b/src/hb-subset-cff2.cc @@ -243,16 +243,17 @@ struct cff2_subr_subsetter_t : subr_subsetter_tcount; drop_hints = plan->flags & HB_SUBSET_FLAGS_NO_HINTING; + pinned = (bool) plan->normalized_coords; desubroutinize = plan->flags & HB_SUBSET_FLAGS_DESUBROUTINIZE || - plan->normalized_coords; // For instancing we need this path + pinned; // For instancing we need this path if (desubroutinize) { @@ -311,8 +312,9 @@ struct cff2_subset_plan { unsigned int orig_fdcount = 0; unsigned int subset_fdcount = 1; - unsigned int subset_fdselect_size = 0; + unsigned int subset_fdselect_size = 0; unsigned int subset_fdselect_format = 0; + bool pinned = false; hb_vector_t subset_fdselect_ranges; hb_inc_bimap_t fdmap; @@ -424,7 +426,8 @@ static bool _serialize_cff2 (hb_serialize_context_t *c, } /* variation store */ - if (acc.varStore != &Null (CFF2VariationStore)) + if (acc.varStore != &Null (CFF2VariationStore) && + !plan.pinned) { c->push (); CFF2VariationStore *dest = c->start_embed ();