removed unused code
This commit is contained in:
parent
e8f010d793
commit
0b29053864
@ -683,7 +683,7 @@ struct cff1_top_dict_values_t : top_dict_values_t<cff1_top_dict_val_t>
|
||||
EncodingOffset = 0;
|
||||
CharsetOffset = 0;
|
||||
FDSelectOffset = 0;
|
||||
private_dict_info.init ();
|
||||
privateDictInfo.init ();
|
||||
}
|
||||
void fini () { top_dict_values_t<cff1_top_dict_val_t>::fini (); }
|
||||
|
||||
@ -698,7 +698,7 @@ struct cff1_top_dict_values_t : top_dict_values_t<cff1_top_dict_val_t>
|
||||
unsigned int EncodingOffset;
|
||||
unsigned int CharsetOffset;
|
||||
unsigned int FDSelectOffset;
|
||||
table_info_t private_dict_info;
|
||||
table_info_t privateDictInfo;
|
||||
};
|
||||
|
||||
struct cff1_top_dict_opset_t : top_dict_opset_t<cff1_top_dict_val_t>
|
||||
@ -769,8 +769,8 @@ struct cff1_top_dict_opset_t : top_dict_opset_t<cff1_top_dict_val_t>
|
||||
break;
|
||||
|
||||
case OpCode_Private:
|
||||
dictval.private_dict_info.offset = env.argStack.pop_uint ();
|
||||
dictval.private_dict_info.size = env.argStack.pop_uint ();
|
||||
dictval.privateDictInfo.offset = env.argStack.pop_uint ();
|
||||
dictval.privateDictInfo.size = env.argStack.pop_uint ();
|
||||
env.clear_args ();
|
||||
break;
|
||||
|
||||
@ -793,12 +793,12 @@ struct cff1_font_dict_values_t : dict_values_t<op_str_t>
|
||||
void init ()
|
||||
{
|
||||
dict_values_t<op_str_t>::init ();
|
||||
private_dict_info.init ();
|
||||
privateDictInfo.init ();
|
||||
fontName = CFF_UNDEF_SID;
|
||||
}
|
||||
void fini () { dict_values_t<op_str_t>::fini (); }
|
||||
|
||||
table_info_t private_dict_info;
|
||||
table_info_t privateDictInfo;
|
||||
unsigned int fontName;
|
||||
};
|
||||
|
||||
@ -816,8 +816,8 @@ struct cff1_font_dict_opset_t : dict_opset_t
|
||||
env.clear_args ();
|
||||
break;
|
||||
case OpCode_Private:
|
||||
dictval.private_dict_info.offset = env.argStack.pop_uint ();
|
||||
dictval.private_dict_info.size = env.argStack.pop_uint ();
|
||||
dictval.privateDictInfo.offset = env.argStack.pop_uint ();
|
||||
dictval.privateDictInfo.size = env.argStack.pop_uint ();
|
||||
env.clear_args ();
|
||||
break;
|
||||
|
||||
@ -957,7 +957,7 @@ struct cff1_font_dict_values_mod_t
|
||||
{
|
||||
base = base_;
|
||||
fontName = fontName_;
|
||||
private_dict_info.init ();
|
||||
privateDictInfo.init ();
|
||||
}
|
||||
|
||||
unsigned get_count () const { return base->get_count (); }
|
||||
@ -965,7 +965,7 @@ struct cff1_font_dict_values_mod_t
|
||||
const op_str_t &operator [] (unsigned int i) const { return (*base)[i]; }
|
||||
|
||||
const cff1_font_dict_values_t *base;
|
||||
table_info_t private_dict_info;
|
||||
table_info_t privateDictInfo;
|
||||
unsigned int fontName;
|
||||
};
|
||||
|
||||
@ -1106,7 +1106,7 @@ struct cff1
|
||||
font->init ();
|
||||
if (unlikely (!font_interp.interpret (*font))) { fini (); return; }
|
||||
PRIVDICTVAL *priv = &privateDicts[i];
|
||||
const byte_str_t privDictStr (StructAtOffset<UnsizedByteStr> (cff, font->private_dict_info.offset), font->private_dict_info.size);
|
||||
const byte_str_t privDictStr (StructAtOffset<UnsizedByteStr> (cff, font->privateDictInfo.offset), font->privateDictInfo.size);
|
||||
if (unlikely (!privDictStr.sanitize (&sc))) { fini (); return; }
|
||||
dict_interpreter_t<PRIVOPSET, PRIVDICTVAL> priv_interp;
|
||||
priv_interp.env.init (privDictStr);
|
||||
@ -1124,7 +1124,7 @@ struct cff1
|
||||
cff1_top_dict_values_t *font = &topDict;
|
||||
PRIVDICTVAL *priv = &privateDicts[0];
|
||||
|
||||
const byte_str_t privDictStr (StructAtOffset<UnsizedByteStr> (cff, font->private_dict_info.offset), font->private_dict_info.size);
|
||||
const byte_str_t privDictStr (StructAtOffset<UnsizedByteStr> (cff, font->privateDictInfo.offset), font->privateDictInfo.size);
|
||||
if (unlikely (!privDictStr.sanitize (&sc))) { fini (); return; }
|
||||
dict_interpreter_t<PRIVOPSET, PRIVDICTVAL> priv_interp;
|
||||
priv_interp.env.init (privDictStr);
|
||||
|
@ -192,11 +192,11 @@ struct cff2_font_dict_values_t : dict_values_t<op_str_t>
|
||||
void init ()
|
||||
{
|
||||
dict_values_t<op_str_t>::init ();
|
||||
private_dict_info.init ();
|
||||
privateDictInfo.init ();
|
||||
}
|
||||
void fini () { dict_values_t<op_str_t>::fini (); }
|
||||
|
||||
table_info_t private_dict_info;
|
||||
table_info_t privateDictInfo;
|
||||
};
|
||||
|
||||
struct cff2_font_dict_opset_t : dict_opset_t
|
||||
@ -205,8 +205,8 @@ struct cff2_font_dict_opset_t : dict_opset_t
|
||||
{
|
||||
switch (op) {
|
||||
case OpCode_Private:
|
||||
dictval.private_dict_info.offset = env.argStack.pop_uint ();
|
||||
dictval.private_dict_info.size = env.argStack.pop_uint ();
|
||||
dictval.privateDictInfo.offset = env.argStack.pop_uint ();
|
||||
dictval.privateDictInfo.size = env.argStack.pop_uint ();
|
||||
env.clear_args ();
|
||||
break;
|
||||
|
||||
@ -456,7 +456,7 @@ struct cff2
|
||||
font->init ();
|
||||
if (unlikely (!font_interp.interpret (*font))) { fini (); return; }
|
||||
|
||||
const byte_str_t privDictStr (StructAtOffsetOrNull<UnsizedByteStr> (cff2, font->private_dict_info.offset), font->private_dict_info.size);
|
||||
const byte_str_t privDictStr (StructAtOffsetOrNull<UnsizedByteStr> (cff2, font->privateDictInfo.offset), font->privateDictInfo.size);
|
||||
if (unlikely (!privDictStr.sanitize (&sc))) { fini (); return; }
|
||||
dict_interpreter_t<PRIVOPSET, PRIVDICTVAL, cff2_priv_dict_interp_env_t> priv_interp;
|
||||
priv_interp.env.init(privDictStr);
|
||||
|
@ -172,15 +172,15 @@ struct cff_font_dict_op_serializer_t : op_serializer_t
|
||||
{
|
||||
bool serialize (hb_serialize_context_t *c,
|
||||
const op_str_t &opstr,
|
||||
const table_info_t &private_dict_info) const
|
||||
const table_info_t &privateDictInfo) const
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
|
||||
if (opstr.op == OpCode_Private)
|
||||
{
|
||||
/* serialize the private dict size & offset as 2-byte & 4-byte integers */
|
||||
return_trace (UnsizedByteStr::serialize_int2 (c, private_dict_info.size) &&
|
||||
Dict::serialize_link4_op (c, opstr.op, private_dict_info.link, whence_t::Absolute));
|
||||
return_trace (UnsizedByteStr::serialize_int2 (c, privateDictInfo.size) &&
|
||||
Dict::serialize_link4_op (c, opstr.op, privateDictInfo.link, whence_t::Absolute));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -71,12 +71,12 @@ struct cff1_sub_table_info_t : cff_sub_table_info_t
|
||||
encoding_link (0),
|
||||
charset_link (0)
|
||||
{
|
||||
private_dict_info.init ();
|
||||
privateDictInfo.init ();
|
||||
}
|
||||
|
||||
objidx_t encoding_link;
|
||||
objidx_t charset_link;
|
||||
table_info_t private_dict_info;
|
||||
table_info_t privateDictInfo;
|
||||
};
|
||||
|
||||
/* a copy of a parsed out cff1_top_dict_values_t augmented with additional operators */
|
||||
@ -147,8 +147,8 @@ struct cff1_top_dict_op_serializer_t : cff_top_dict_op_serializer_t<cff1_top_dic
|
||||
goto fall_back;
|
||||
|
||||
case OpCode_Private:
|
||||
return_trace (UnsizedByteStr::serialize_int2 (c, mod.info.private_dict_info.size) &&
|
||||
Dict::serialize_link4_op (c, op, mod.info.private_dict_info.link, whence_t::Absolute));
|
||||
return_trace (UnsizedByteStr::serialize_int2 (c, mod.info.privateDictInfo.size) &&
|
||||
Dict::serialize_link4_op (c, op, mod.info.privateDictInfo.link, whence_t::Absolute));
|
||||
|
||||
case OpCode_version:
|
||||
case OpCode_Notice:
|
||||
@ -194,7 +194,7 @@ struct cff1_font_dict_op_serializer_t : cff_font_dict_op_serializer_t
|
||||
if (opstr.op == OpCode_FontName)
|
||||
return_trace (FontDict::serialize_int2_op (c, opstr.op, mod.fontName));
|
||||
else
|
||||
return_trace (SUPER::serialize (c, opstr, mod.private_dict_info));
|
||||
return_trace (SUPER::serialize (c, opstr, mod.privateDictInfo));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -734,8 +734,8 @@ static bool _serialize_cff1 (hb_serialize_context_t *c,
|
||||
if (likely (pd->serialize (c, acc.privateDicts[i], privSzr, subrs_link)))
|
||||
{
|
||||
unsigned fd = plan.fdmap[i];
|
||||
plan.fontdicts_mod[fd].private_dict_info.size = c->length ();
|
||||
plan.fontdicts_mod[fd].private_dict_info.link = c->pop_pack ();
|
||||
plan.fontdicts_mod[fd].privateDictInfo.size = c->length ();
|
||||
plan.fontdicts_mod[fd].privateDictInfo.link = c->pop_pack ();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -746,7 +746,7 @@ static bool _serialize_cff1 (hb_serialize_context_t *c,
|
||||
}
|
||||
|
||||
if (!acc.is_CID ())
|
||||
plan.info.private_dict_info = plan.fontdicts_mod[0].private_dict_info;
|
||||
plan.info.privateDictInfo = plan.fontdicts_mod[0].privateDictInfo;
|
||||
|
||||
/* CharStrings */
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user