[cff] Rename encode_num to encode_num_cs

This commit is contained in:
Behdad Esfahbod 2023-02-19 17:11:30 -07:00
parent c65eb5a82e
commit f10a4c9d6a
3 changed files with 7 additions and 7 deletions

View File

@ -81,7 +81,7 @@ struct str_encoder_t
}
}
void encode_num (const number_t& n)
void encode_num_cs (const number_t& n)
{
if (n.in_int_range ())
{
@ -964,7 +964,7 @@ struct subr_subsetter_t
* re-insert it at the beginning of charstreing */
if (encode_prefix && str.has_prefix () && !hinting && str.is_hint_dropped ())
{
encoder.encode_num (str.prefix_num ());
encoder.encode_num_cs (str.prefix_num ());
if (str.prefix_op () != OpCode_Invalid)
encoder.encode_op (str.prefix_op ());
}

View File

@ -234,7 +234,7 @@ struct cff1_cs_opset_flatten_t : cff1_cs_opset_t<cff1_cs_opset_flatten_t, flatte
{
str_encoder_t encoder (param.flatStr);
for (unsigned int i = env.arg_start; i < env.argStack.get_count (); i++)
encoder.encode_num (env.eval_arg (i));
encoder.encode_num_cs (env.eval_arg (i));
SUPER::flush_args (env, param);
}
@ -248,7 +248,7 @@ struct cff1_cs_opset_flatten_t : cff1_cs_opset_t<cff1_cs_opset_flatten_t, flatte
{
assert (env.has_width);
str_encoder_t encoder (param.flatStr);
encoder.encode_num (env.width);
encoder.encode_num_cs (env.width);
}
static void flush_hintmask (op_code_t op, cff1_cs_interp_env_t &env, flatten_param_t& param)

View File

@ -118,7 +118,7 @@ struct cff2_cs_opset_flatten_t : cff2_cs_opset_t<cff2_cs_opset_flatten_t, flatte
else
{
str_encoder_t encoder (param.flatStr);
encoder.encode_num (arg);
encoder.encode_num_cs (arg);
i++;
}
}
@ -138,14 +138,14 @@ struct cff2_cs_opset_flatten_t : cff2_cs_opset_t<cff2_cs_opset_flatten_t, flatte
env.set_error ();
return;
}
encoder.encode_num (arg1);
encoder.encode_num_cs (arg1);
}
/* flatten deltas for each value */
for (unsigned int j = 0; j < arg.numValues; j++)
{
const blend_arg_t &arg1 = env.argStack[i + j];
for (unsigned int k = 0; k < arg1.deltas.length; k++)
encoder.encode_num (arg1.deltas[k]);
encoder.encode_num_cs (arg1.deltas[k]);
}
/* flatten the number of values followed by blend operator */
encoder.encode_int (arg.numValues);