From 2746597b69c10b7aa1c0df2a4d36a3d92fb0769f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 19 Feb 2023 12:14:35 -0700 Subject: [PATCH] [subset-cff2] Add flush_hintmask Fixes https://github.com/harfbuzz/harfbuzz/issues/4125 --- src/hb-subset-cff2.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/hb-subset-cff2.cc b/src/hb-subset-cff2.cc index 01eb3fe89..d2fcdceac 100644 --- a/src/hb-subset-cff2.cc +++ b/src/hb-subset-cff2.cc @@ -162,6 +162,17 @@ struct cff2_cs_opset_flatten_t : cff2_cs_opset_t &env, flatten_param_t& param) + { + SUPER::flush_hintmask (op, env, param); + if (!param.drop_hints) + { + str_encoder_t encoder (param.flatStr); + for (unsigned int i = 0; i < env.hintmask_size; i++) + encoder.encode_byte (env.str_ref[i]); + } + } + private: typedef cff2_cs_opset_t SUPER; typedef cs_opset_t, flatten_param_t> CSOPSET;