From af61c3b10f83a00b4862cc0cb92fc9f0856e7dd6 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Wed, 10 Oct 2018 18:35:12 -0700 Subject: [PATCH] added vsindex test & fixed process_vsindex --- src/hb-cff2-interp-cs.hh | 12 ++++--- test/api/fonts/AdobeVFPrototype_vsindex.otf | Bin 0 -> 7036 bytes test/api/test-ot-extents-cff.c | 33 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 test/api/fonts/AdobeVFPrototype_vsindex.otf diff --git a/src/hb-cff2-interp-cs.hh b/src/hb-cff2-interp-cs.hh index 639a7e5c..f05b10c8 100644 --- a/src/hb-cff2-interp-cs.hh +++ b/src/hb-cff2-interp-cs.hh @@ -140,11 +140,14 @@ struct CFF2CSInterpEnv : CSInterpEnv inline void process_vsindex (void) { - if (do_blend) + unsigned int index; + if (likely (argStack.check_pop_uint (index))) { - unsigned int index; - if (likely (!seen_vsindex && !seen_blend && argStack.check_pop_uint (index))) - set_ivs (argStack.check_pop_uint (index)); + if (do_blend) + { + if (likely (!seen_vsindex && !seen_blend)) + set_ivs (index); + } } seen_vsindex = true; } @@ -236,7 +239,6 @@ struct CFF2CSOpSet : CSOpSet static inline void process_vsindex (CFF2CSInterpEnv &env, PARAM& param) { env.process_vsindex (); - OPSET::flush_args_and_op (OpCode_vsindexcs, env, param, env.argStack.get_count ()-1); } private: diff --git a/test/api/fonts/AdobeVFPrototype_vsindex.otf b/test/api/fonts/AdobeVFPrototype_vsindex.otf new file mode 100644 index 0000000000000000000000000000000000000000..3697b46c124cf364cb25afe73e9e5235b5c50892 GIT binary patch literal 7036 zcmeHMX>e3k7C!Iwl1>Pr*+Ce5GGP%Rh6n)#m9UAjG$t`%4I-VSLsF#E(CLr>ktJKF z`}LBoLlS`?C8bp=qcA^oMyn`>s$r}Whbd<%8FjQ6mvI{v?O+FczH{Ge!ZwA>_;cP% zzIX1~?z!ild*9Nw{Cpdw(QY!(hDA%4X078 zoc8UC|N!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