From 049ce078e51bebce50b17889f3edae3db3ea39f5 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Thu, 1 Nov 2018 08:46:21 -0700 Subject: [PATCH] fix bogus width with --no-hinting --- src/hb-cff1-interp-cs.hh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/hb-cff1-interp-cs.hh b/src/hb-cff1-interp-cs.hh index 8a10abc26..ec8a7faed 100644 --- a/src/hb-cff1-interp-cs.hh +++ b/src/hb-cff1-interp-cs.hh @@ -51,15 +51,18 @@ struct CFF1CSInterpEnv : CSInterpEnv SUPER::fini (); } - inline void set_width (void) + inline void set_width (bool has_width_) { if (likely (!processed_width && (SUPER::argStack.get_count () > 0))) { - width = SUPER::argStack[0]; - has_width = true; - processed_width = true; - arg_start = 1; + if (has_width_) + { + width = SUPER::argStack[0]; + has_width = true; + arg_start = 1; + } } + processed_width = true; } inline void clear_args (void) @@ -107,9 +110,9 @@ struct CFF1CSOpSet : CSOpSet has_width = (env.argStack.get_count () > 2); break; } + env.set_width (has_width); if (has_width) { - env.set_width (); OPSET::process_width (env, param); } }