diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index 10a95998e..b794bbaaf 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh @@ -36,7 +36,7 @@ namespace CFF { * CFF -- Compact Font Format (CFF) * http://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5176.CFF.pdf */ -#define HB_OT_TAG_cff HB_TAG('C','F','F',' ') +#define HB_OT_TAG_cff1 HB_TAG('C','F','F',' ') typedef Index CFF1Index; template struct CFF1IndexOf : IndexOf {}; @@ -679,9 +679,9 @@ namespace OT { using namespace CFF; -struct cff +struct cff1 { - static const hb_tag_t tableTag = HB_OT_TAG_cff; + static const hb_tag_t tableTag = HB_OT_TAG_cff1; inline bool sanitize (hb_sanitize_context_t *c) const { @@ -701,15 +701,15 @@ struct cff fontDicts.init (); privateDicts.init (); - this->blob = sc.reference_table (face); + this->blob = sc.reference_table (face); /* setup for run-time santization */ sc.init (this->blob); sc.start_processing (); - const OT::cff *cff = this->blob->template as (); + const OT::cff1 *cff = this->blob->template as (); - if (cff == &Null(OT::cff)) + if (cff == &Null(OT::cff1)) { fini (); return; } nameIndex = &cff->nameIndex (cff); @@ -875,7 +875,7 @@ struct cff bool success = true; if (hb_subset_cff1 (plan, &cff_prime)) { - success = success && plan->add_table (HB_OT_TAG_cff, cff_prime); + success = success && plan->add_table (HB_OT_TAG_cff1, cff_prime); } else { success = false; } diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc index 228687a70..5e5434976 100644 --- a/src/hb-subset-cff1.cc +++ b/src/hb-subset-cff1.cc @@ -239,14 +239,14 @@ struct cff_subset_plan { subrRefMaps.fini (); } - inline bool create (const OT::cff::accelerator_subset_t &acc, + inline bool create (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan) { final_size = 0; orig_fdcount = acc.fdCount; /* CFF header */ - final_size += OT::cff::static_size; + final_size += OT::cff1::static_size; /* Name INDEX */ offsets.nameIndexOffset = final_size; @@ -267,7 +267,7 @@ struct cff_subset_plan { /* Subset global & local subrs */ { - SubrSubsetter subsetter(acc, plan->glyphs); + SubrSubsetter subsetter(acc, plan->glyphs); if (!subsetter.collect_refs (subrRefMaps)) return false; @@ -374,7 +374,7 @@ struct cff_subset_plan { }; static inline bool _write_cff1 (const cff_subset_plan &plan, - const OT::cff::accelerator_subset_t &acc, + const OT::cff1::accelerator_subset_t &acc, const hb_vector_t& glyphs, unsigned int dest_sz, void *dest) @@ -384,7 +384,7 @@ static inline bool _write_cff1 (const cff_subset_plan &plan, char RETURN_OP[1] = { OpCode_return }; const ByteStr NULL_SUBR (RETURN_OP, 1); - OT::cff *cff = c.start_serialize (); + OT::cff1 *cff = c.start_serialize (); if (unlikely (!c.extend_min (*cff))) return false; @@ -561,7 +561,7 @@ static inline bool _write_cff1 (const cff_subset_plan &plan, } static bool -_hb_subset_cff1 (const OT::cff::accelerator_subset_t &acc, +_hb_subset_cff1 (const OT::cff1::accelerator_subset_t &acc, const char *data, hb_subset_plan_t *plan, hb_blob_t **prime /* OUT */) @@ -602,10 +602,10 @@ bool hb_subset_cff1 (hb_subset_plan_t *plan, hb_blob_t **prime /* OUT */) { - hb_blob_t *cff_blob = hb_sanitize_context_t().reference_table (plan->source); + hb_blob_t *cff_blob = hb_sanitize_context_t().reference_table (plan->source); const char *data = hb_blob_get_data(cff_blob, nullptr); - OT::cff::accelerator_subset_t acc; + OT::cff1::accelerator_subset_t acc; acc.init(plan->source); bool result = likely (acc.is_valid ()) && _hb_subset_cff1 (acc, data, plan, prime); diff --git a/src/hb-subset.cc b/src/hb-subset.cc index 98401a431..bf9c39949 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -272,8 +272,8 @@ _subset_table (hb_subset_plan_t *plan, case HB_OT_TAG_post: result = _subset (plan); break; - case HB_OT_TAG_cff: - result = _subset (plan); + case HB_OT_TAG_cff1: + result = _subset (plan); break; case HB_OT_TAG_cff2: result = _subset (plan);