fix bogus width with --no-hinting

pull/1113/head
Michiharu Ariza 6 years ago
parent d56e338a90
commit 049ce078e5
  1. 9
      src/hb-cff1-interp-cs.hh

@ -51,16 +51,19 @@ struct CFF1CSInterpEnv : CSInterpEnv<Number, CFF1Subrs>
SUPER::fini (); SUPER::fini ();
} }
inline void set_width (void) inline void set_width (bool has_width_)
{ {
if (likely (!processed_width && (SUPER::argStack.get_count () > 0))) if (likely (!processed_width && (SUPER::argStack.get_count () > 0)))
{
if (has_width_)
{ {
width = SUPER::argStack[0]; width = SUPER::argStack[0];
has_width = true; has_width = true;
processed_width = true;
arg_start = 1; arg_start = 1;
} }
} }
processed_width = true;
}
inline void clear_args (void) inline void clear_args (void)
{ {
@ -107,9 +110,9 @@ struct CFF1CSOpSet : CSOpSet<Number, OPSET, CFF1CSInterpEnv, PARAM, PATH>
has_width = (env.argStack.get_count () > 2); has_width = (env.argStack.get_count () > 2);
break; break;
} }
env.set_width (has_width);
if (has_width) if (has_width)
{ {
env.set_width ();
OPSET::process_width (env, param); OPSET::process_width (env, param);
} }
} }

Loading…
Cancel
Save