[subset-cff2] Don't serialize VarStore if pinned
This commit is contained in:
parent
8c1b47d7e2
commit
a88f3e8d37
|
@ -243,16 +243,17 @@ struct cff2_subr_subsetter_t : subr_subsetter_t<cff2_subr_subsetter_t, CFF2Subrs
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cff2_subset_plan {
|
struct cff2_subset_plan
|
||||||
|
{
|
||||||
bool create (const OT::cff2::accelerator_subset_t &acc,
|
bool create (const OT::cff2::accelerator_subset_t &acc,
|
||||||
hb_subset_plan_t *plan)
|
hb_subset_plan_t *plan)
|
||||||
{
|
{
|
||||||
orig_fdcount = acc.fdArray->count;
|
orig_fdcount = acc.fdArray->count;
|
||||||
|
|
||||||
drop_hints = plan->flags & HB_SUBSET_FLAGS_NO_HINTING;
|
drop_hints = plan->flags & HB_SUBSET_FLAGS_NO_HINTING;
|
||||||
|
pinned = (bool) plan->normalized_coords;
|
||||||
desubroutinize = plan->flags & HB_SUBSET_FLAGS_DESUBROUTINIZE ||
|
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)
|
if (desubroutinize)
|
||||||
{
|
{
|
||||||
|
@ -313,6 +314,7 @@ struct cff2_subset_plan {
|
||||||
unsigned int subset_fdcount = 1;
|
unsigned int subset_fdcount = 1;
|
||||||
unsigned int subset_fdselect_size = 0;
|
unsigned int subset_fdselect_size = 0;
|
||||||
unsigned int subset_fdselect_format = 0;
|
unsigned int subset_fdselect_format = 0;
|
||||||
|
bool pinned = false;
|
||||||
hb_vector_t<code_pair_t> subset_fdselect_ranges;
|
hb_vector_t<code_pair_t> subset_fdselect_ranges;
|
||||||
|
|
||||||
hb_inc_bimap_t fdmap;
|
hb_inc_bimap_t fdmap;
|
||||||
|
@ -424,7 +426,8 @@ static bool _serialize_cff2 (hb_serialize_context_t *c,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* variation store */
|
/* variation store */
|
||||||
if (acc.varStore != &Null (CFF2VariationStore))
|
if (acc.varStore != &Null (CFF2VariationStore) &&
|
||||||
|
!plan.pinned)
|
||||||
{
|
{
|
||||||
c->push ();
|
c->push ();
|
||||||
CFF2VariationStore *dest = c->start_embed<CFF2VariationStore> ();
|
CFF2VariationStore *dest = c->start_embed<CFF2VariationStore> ();
|
||||||
|
|
Loading…
Reference in New Issue