From 220caa7e095b62fef55b03f32b65ddc564d8dc63 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 19 Feb 2023 11:01:27 -0700 Subject: [PATCH] [subset-cff2] Only encode VarStore link if any varstore --- src/hb-subset-cff2.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hb-subset-cff2.cc b/src/hb-subset-cff2.cc index 5335ca997..9bf28e87b 100644 --- a/src/hb-subset-cff2.cc +++ b/src/hb-subset-cff2.cc @@ -59,7 +59,10 @@ struct cff2_top_dict_op_serializer_t : cff_top_dict_op_serializer_t<> switch (opstr.op) { case OpCode_vstore: - return_trace (FontDict::serialize_link4_op(c, opstr.op, info.var_store_link)); + if (info.var_store_link) + return_trace (FontDict::serialize_link4_op(c, opstr.op, info.var_store_link)); + else + return_trace (true); default: return_trace (cff_top_dict_op_serializer_t<>::serialize (c, opstr, info));