Lines Matching refs:plan
469 …signed int plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan) in plan_subset_encoding()
480 subset_enc_num_codes = plan->num_output_glyphs () - 1; in plan_subset_encoding()
482 for (glyph = 1; glyph < plan->num_output_glyphs (); glyph++) in plan_subset_encoding()
485 if (!plan->old_gid_for_new_gid (glyph, &old_glyph)) in plan_subset_encoding()
535 …nsigned int plan_subset_charset (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan) in plan_subset_charset()
542 for (glyph = 1; glyph < plan->num_output_glyphs (); glyph++) in plan_subset_charset()
545 if (!plan->old_gid_for_new_gid (glyph, &old_glyph)) in plan_subset_charset()
565 size0 = Charset0::min_size + HBUINT16::static_size * (plan->num_output_glyphs () - 1); in plan_subset_charset()
580 subset_charset_format? subset_charset_ranges.length: plan->num_output_glyphs ()); in plan_subset_charset()
606 hb_subset_plan_t *plan) in create()
610 if (!plan->old_gid_for_new_gid (0, &old_glyph) || (old_glyph != 0)) return false; in create()
613 num_glyphs = plan->num_output_glyphs (); in create()
615 drop_hints = plan->drop_hints; in create()
616 desubroutinize = plan->desubroutinize; in create()
620 for (hb_codepoint_t new_glyph = 0; new_glyph < plan->num_output_glyphs (); new_glyph++) in create()
622 if (!plan->old_gid_for_new_gid(new_glyph, &old_glyph)) in create()
667 if (unlikely (!hb_plan_subset_cff_fdselect (plan, in create()
688 offsets.charsetInfo.size = plan_subset_charset (acc, plan); in create()
704 flattener(acc, plan); in create()
713 cff1_subr_subsetter_t subr_subsetter (acc, plan); in create()
770 final_size += plan_subset_encoding (acc, plan); in create()
809 …1CharStrings::calculate_serialized_size (offsets.charStringsInfo.offSize, plan->num_output_glyphs … in create()
819 cff_private_dict_op_serializer_t privSzr (desubroutinize, plan->drop_hints); in create()
830 if (!plan->desubroutinize && has_localsubrs) in create()
841 return ((subset_charstrings.length == plan->num_output_glyphs ()) in create()
886 static inline bool _write_cff1 (const cff_subset_plan &plan, in _write_cff1() argument
918 assert (plan.offsets.topDictInfo.offset == (unsigned) (c.head - c.start)); in _write_cff1()
922 top_dict_modifiers_t modifier (plan.offsets, plan.topDictModSIDs); in _write_cff1()
923 if (unlikely (!dest->serialize (&c, plan.offsets.topDictInfo.offSize, in _write_cff1()
924 &plan.topdict_mod, 1, in _write_cff1()
925 plan.topdict_sizes, topSzr, modifier))) in _write_cff1()
934 assert (plan.offsets.stringIndexInfo.offset == (unsigned) (c.head - c.start)); in _write_cff1()
937 …if (unlikely (!dest->serialize (&c, *acc.stringIndex, plan.offsets.stringIndexInfo.offSize, plan.s… in _write_cff1()
946 assert (plan.offsets.globalSubrsInfo.offset != 0); in _write_cff1()
947 assert (plan.offsets.globalSubrsInfo.offset == (unsigned) (c.head - c.start)); in _write_cff1()
951 …if (unlikely (!dest->serialize (&c, plan.offsets.globalSubrsInfo.offSize, plan.subset_globalsubrs)… in _write_cff1()
959 if (plan.subset_encoding) in _write_cff1()
961 assert (plan.offsets.encodingOffset == (unsigned) (c.head - c.start)); in _write_cff1()
965 plan.subset_enc_format, in _write_cff1()
966 plan.subset_enc_num_codes, in _write_cff1()
967 plan.subset_enc_code_ranges, in _write_cff1()
968 plan.subset_enc_supp_codes))) in _write_cff1()
976 if (plan.subset_charset) in _write_cff1()
978 assert (plan.offsets.charsetInfo.offset == (unsigned) (c.head - c.start)); in _write_cff1()
982 plan.subset_charset_format, in _write_cff1()
983 plan.num_glyphs, in _write_cff1()
984 plan.subset_charset_ranges))) in _write_cff1()
994 assert (plan.offsets.FDSelectInfo.offset == (unsigned) (c.head - c.start)); in _write_cff1()
997 plan.subset_fdselect_format, plan.offsets.FDSelectInfo.size, in _write_cff1()
998 plan.subset_fdselect_ranges))) in _write_cff1()
1008 assert (plan.offsets.FDArrayInfo.offset == (unsigned) (c.head - c.start)); in _write_cff1()
1012 if (unlikely (!fda->serialize (&c, plan.offsets.FDArrayInfo.offSize, in _write_cff1()
1013 plan.fontdicts_mod, in _write_cff1()
1023 assert (plan.offsets.charStringsInfo.offset == (unsigned) (c.head - c.start)); in _write_cff1()
1026 … if (unlikely (!cs->serialize (&c, plan.offsets.charStringsInfo.offSize, plan.subset_charstrings))) in _write_cff1()
1034 assert (plan.offsets.privateDictInfo.offset == (unsigned) (c.head - c.start)); in _write_cff1()
1037 if (plan.fdmap.has (i)) in _write_cff1()
1041 unsigned int priv_size = plan.fontdicts_mod[plan.fdmap[i]].privateDictInfo.size; in _write_cff1()
1043 cff_private_dict_op_serializer_t privSzr (plan.desubroutinize, plan.drop_hints); in _write_cff1()
1045 unsigned int subroffset = (plan.offsets.localSubrsInfos[i].size > 0) ? priv_size : 0; in _write_cff1()
1052 if (plan.offsets.localSubrsInfos[i].size > 0) in _write_cff1()
1056 …if (unlikely (!dest->serialize (&c, plan.offsets.localSubrsInfos[i].offSize, plan.subset_localsubr… in _write_cff1()
1074 hb_subset_plan_t *plan, in _hb_subset_cff1() argument
1079 if (unlikely (!cff_plan.create (acc, plan))) in _hb_subset_cff1()
1088 if (unlikely (!_write_cff1 (cff_plan, acc, plan->num_output_glyphs (), in _hb_subset_cff1()
1110 hb_subset_cff1 (hb_subset_plan_t *plan, in hb_subset_cff1() argument
1113 hb_blob_t *cff_blob = hb_sanitize_context_t().reference_table<CFF::cff1> (plan->source); in hb_subset_cff1()
1117 acc.init(plan->source); in hb_subset_cff1()
1119 _hb_subset_cff1 (acc, data, plan, prime); in hb_subset_cff1()