[subset-cff1] Remove a constructor/destructor pair
This commit is contained in:
parent
a1e9a276eb
commit
07474aa8c6
|
@ -362,33 +362,11 @@ struct cff1_subr_subsetter_t : subr_subsetter_t<cff1_subr_subsetter_t, CFF1Subrs
|
||||||
|
|
||||||
struct cff_subset_plan {
|
struct cff_subset_plan {
|
||||||
cff_subset_plan ()
|
cff_subset_plan ()
|
||||||
: info (),
|
|
||||||
orig_fdcount (0),
|
|
||||||
subset_fdcount (1),
|
|
||||||
subset_fdselect_format (0),
|
|
||||||
drop_hints (false),
|
|
||||||
desubroutinize(false)
|
|
||||||
{
|
{
|
||||||
topdict_mod.init ();
|
|
||||||
subset_fdselect_ranges.init ();
|
|
||||||
subset_charstrings.init ();
|
|
||||||
subset_globalsubrs.init ();
|
|
||||||
subset_enc_code_ranges.init ();
|
|
||||||
subset_charset_ranges.init ();
|
|
||||||
for (unsigned int i = 0; i < name_dict_values_t::ValCount; i++)
|
for (unsigned int i = 0; i < name_dict_values_t::ValCount; i++)
|
||||||
topDictModSIDs[i] = CFF_UNDEF_SID;
|
topDictModSIDs[i] = CFF_UNDEF_SID;
|
||||||
}
|
}
|
||||||
|
|
||||||
~cff_subset_plan ()
|
|
||||||
{
|
|
||||||
topdict_mod.fini ();
|
|
||||||
subset_fdselect_ranges.fini ();
|
|
||||||
subset_charstrings.fini_deep ();
|
|
||||||
subset_globalsubrs.fini_deep ();
|
|
||||||
subset_enc_code_ranges.fini ();
|
|
||||||
subset_charset_ranges.fini ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan)
|
void plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan)
|
||||||
{
|
{
|
||||||
const Encoding *encoding = acc.encoding;
|
const Encoding *encoding = acc.encoding;
|
||||||
|
@ -662,9 +640,9 @@ struct cff_subset_plan {
|
||||||
cff1_sub_table_info_t info;
|
cff1_sub_table_info_t info;
|
||||||
|
|
||||||
unsigned int num_glyphs;
|
unsigned int num_glyphs;
|
||||||
unsigned int orig_fdcount;
|
unsigned int orig_fdcount = 0;
|
||||||
unsigned int subset_fdcount;
|
unsigned int subset_fdcount = 1;
|
||||||
unsigned int subset_fdselect_format;
|
unsigned int subset_fdselect_format = 0;
|
||||||
hb_vector_t<code_pair_t> subset_fdselect_ranges;
|
hb_vector_t<code_pair_t> subset_fdselect_ranges;
|
||||||
|
|
||||||
/* font dict index remap table from fullset FDArray to subset FDArray.
|
/* font dict index remap table from fullset FDArray to subset FDArray.
|
||||||
|
@ -676,7 +654,7 @@ struct cff_subset_plan {
|
||||||
hb_vector_t<str_buff_vec_t> subset_localsubrs;
|
hb_vector_t<str_buff_vec_t> subset_localsubrs;
|
||||||
hb_vector_t<cff1_font_dict_values_mod_t> fontdicts_mod;
|
hb_vector_t<cff1_font_dict_values_mod_t> fontdicts_mod;
|
||||||
|
|
||||||
bool drop_hints;
|
bool drop_hints = false;
|
||||||
|
|
||||||
bool gid_renum;
|
bool gid_renum;
|
||||||
bool subset_encoding;
|
bool subset_encoding;
|
||||||
|
@ -692,7 +670,7 @@ struct cff_subset_plan {
|
||||||
remap_sid_t sidmap;
|
remap_sid_t sidmap;
|
||||||
unsigned int topDictModSIDs[name_dict_values_t::ValCount];
|
unsigned int topDictModSIDs[name_dict_values_t::ValCount];
|
||||||
|
|
||||||
bool desubroutinize;
|
bool desubroutinize = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool _serialize_cff1 (hb_serialize_context_t *c,
|
static bool _serialize_cff1 (hb_serialize_context_t *c,
|
||||||
|
|
Loading…
Reference in New Issue