From 2840a104c1288af79cbda720afa9e37aec6fb29d Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Thu, 1 Nov 2018 16:18:13 -0700 Subject: [PATCH] tweaks to build with new merge --- src/hb-cff2-interp-cs.hh | 11 +++++++---- src/hb-ot-cff2-table.cc | 9 +++++---- src/hb-ot-cff2-table.hh | 7 +++---- src/hb-subset-cff-common.cc | 12 ++++-------- src/hb-subset-cff-common.hh | 3 +-- src/hb-subset-cff1.cc | 3 +-- src/hb-subset-cff2.cc | 3 +-- 7 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/hb-cff2-interp-cs.hh b/src/hb-cff2-interp-cs.hh index 18877463c..592a1b23e 100644 --- a/src/hb-cff2-interp-cs.hh +++ b/src/hb-cff2-interp-cs.hh @@ -114,12 +114,16 @@ struct CFF2CSInterpEnv : CSInterpEnv inline const BlendArg& eval_arg (unsigned int i) { - return blend_arg (argStack[i]); + BlendArg &arg = argStack[i]; + blend_arg (arg); + return arg; } inline const BlendArg& pop_arg (void) { - return blend_arg (argStack.pop ()); + BlendArg &arg = argStack.pop (); + blend_arg (arg); + return arg; } inline void process_blend (void) @@ -155,7 +159,7 @@ struct CFF2CSInterpEnv : CSInterpEnv inline void set_ivs (unsigned int ivs_) { ivs = ivs_; } protected: - inline BlendArg& blend_arg (BlendArg &arg) + inline void blend_arg (BlendArg &arg) { if (do_blend && arg.blending ()) { @@ -170,7 +174,6 @@ struct CFF2CSInterpEnv : CSInterpEnv arg.deltas.resize (0); } } - return arg; } protected: diff --git a/src/hb-ot-cff2-table.cc b/src/hb-ot-cff2-table.cc index 7f66b04be..a1154b3f4 100644 --- a/src/hb-ot-cff2-table.cc +++ b/src/hb-ot-cff2-table.cc @@ -95,13 +95,14 @@ struct CFF2PathProcs_Extents : PathProcs {}; -bool OT::cff2::accelerator_t::get_extents (hb_codepoint_t glyph, - hb_glyph_extents_t *extents, - const int *coords, - unsigned int num_coords) const +bool OT::cff2::accelerator_t::get_extents (hb_font_t *font, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents) const { if (unlikely (!is_valid () || (glyph >= num_glyphs))) return false; + unsigned int num_coords; + const int *coords = hb_font_get_var_coords_normalized (font, &num_coords); unsigned int fd = fdSelect->get_fd (glyph); CFF2CSInterpreter interp; const ByteStr str = (*charStrings)[glyph]; diff --git a/src/hb-ot-cff2-table.hh b/src/hb-ot-cff2-table.hh index a12ef561e..04d9e2b38 100644 --- a/src/hb-ot-cff2-table.hh +++ b/src/hb-ot-cff2-table.hh @@ -534,10 +534,9 @@ struct cff2 struct accelerator_t : accelerator_templ_t { - HB_INTERNAL bool get_extents (hb_codepoint_t glyph, - hb_glyph_extents_t *extents, - const int *coords, - unsigned int num_coords) const; + HB_INTERNAL bool get_extents (hb_font_t *font, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents) const; }; typedef accelerator_templ_t accelerator_subset_t; diff --git a/src/hb-subset-cff-common.cc b/src/hb-subset-cff-common.cc index 9e4bb6008..f5fcebdb6 100644 --- a/src/hb-subset-cff-common.cc +++ b/src/hb-subset-cff-common.cc @@ -144,8 +144,7 @@ serialize_fdselect_3_4 (hb_serialize_context_t *c, const unsigned int num_glyphs, const FDSelect &src, unsigned int size, - const hb_vector_t &fdselect_ranges, - const Remap &fdmap) + const hb_vector_t &fdselect_ranges) { TRACE_SERIALIZE (this); FDSELECT3_4 *p = c->allocate_size (size); @@ -171,8 +170,7 @@ hb_serialize_cff_fdselect (hb_serialize_context_t *c, unsigned int fd_count, unsigned int fdselect_format, unsigned int size, - const hb_vector_t &fdselect_ranges, - const Remap &fdmap) + const hb_vector_t &fdselect_ranges) { TRACE_SERIALIZE (this); FDSelect *p = c->allocate_min (); @@ -207,16 +205,14 @@ hb_serialize_cff_fdselect (hb_serialize_context_t *c, num_glyphs, src, size, - fdselect_ranges, - fdmap); + fdselect_ranges); case 4: return serialize_fdselect_3_4 (c, num_glyphs, src, size, - fdselect_ranges, - fdmap); + fdselect_ranges); default: assert(false); diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index 6debb85db..aeb77a9c3 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -932,7 +932,6 @@ hb_serialize_cff_fdselect (hb_serialize_context_t *c, unsigned int fd_count, unsigned int fdselect_format, unsigned int size, - const hb_vector_t &fdselect_ranges, - const CFF::Remap &fdmap); + const hb_vector_t &fdselect_ranges); #endif /* HB_SUBSET_CFF_COMMON_HH */ diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc index baac97714..16f5bb1c5 100644 --- a/src/hb-subset-cff1.cc +++ b/src/hb-subset-cff1.cc @@ -960,8 +960,7 @@ static inline bool _write_cff1 (const cff_subset_plan &plan, { if (unlikely (!hb_serialize_cff_fdselect (&c, glyphs.len, *acc.fdSelect, acc.fdCount, plan.subset_fdselect_format, plan.offsets.FDSelectInfo.size, - plan.subset_fdselect_ranges, - plan.fdmap))) + plan.subset_fdselect_ranges))) { DEBUG_MSG (SUBSET, nullptr, "failed to serialize CFF subset FDSelect"); return false; diff --git a/src/hb-subset-cff2.cc b/src/hb-subset-cff2.cc index db7ce43f2..f28af2ba2 100644 --- a/src/hb-subset-cff2.cc +++ b/src/hb-subset-cff2.cc @@ -372,8 +372,7 @@ static inline bool _write_cff2 (const cff2_subset_plan &plan, { if (unlikely (!hb_serialize_cff_fdselect (&c, glyphs.len, *(const FDSelect *)acc.fdSelect, acc.fdArray->count, plan.subset_fdselect_format, plan.offsets.FDSelectInfo.size, - plan.subset_fdselect_ranges, - plan.fdmap))) + plan.subset_fdselect_ranges))) { DEBUG_MSG (SUBSET, nullptr, "failed to serialize CFF2 subset FDSelect"); return false;