From 2cd8b0fe12bfff91766553466c373294ad80e2d9 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Thu, 31 Jan 2019 23:16:40 +0000 Subject: harfbuzz 2.3.1 git-svn-id: svn://tug.org/texlive/trunk@49891 c570f23f-e606-0410-a88d-b1316a301751 --- .../harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh') diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh index 709bdefa1dc..49e5ee7397e 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh @@ -33,26 +33,26 @@ namespace CFF { using namespace OT; -struct BlendArg : Number +struct blend_arg_t : number_t { void init () { - Number::init (); + number_t::init (); deltas.init (); } void fini () { - Number::fini (); + number_t::fini (); deltas.fini_deep (); } - void set_int (int v) { reset_blends (); Number::set_int (v); } - void set_fixed (int32_t v) { reset_blends (); Number::set_fixed (v); } - void set_real (double v) { reset_blends (); Number::set_real (v); } + void set_int (int v) { reset_blends (); number_t::set_int (v); } + void set_fixed (int32_t v) { reset_blends (); number_t::set_fixed (v); } + void set_real (double v) { reset_blends (); number_t::set_real (v); } void set_blends (unsigned int numValues_, unsigned int valueIndex_, - unsigned int numBlends, hb_array_t blends_) + unsigned int numBlends, hb_array_t blends_) { numValues = numValues_; valueIndex = valueIndex_; @@ -61,7 +61,7 @@ struct BlendArg : Number deltas[i] = blends_[i]; } - bool blending () const { return deltas.len > 0; } + bool blending () const { return deltas.length > 0; } void reset_blends () { numValues = valueIndex = 0; @@ -70,16 +70,16 @@ struct BlendArg : Number unsigned int numValues; unsigned int valueIndex; - hb_vector_t deltas; + hb_vector_t deltas; }; -typedef InterpEnv BlendInterpEnv; -typedef BiasedSubrs CFF2BiasedSubrs; +typedef interp_env_t BlendInterpEnv; +typedef biased_subrs_t cff2_biased_subrs_t; -struct CFF2CSInterpEnv : CSInterpEnv +struct cff2_cs_interp_env_t : cs_interp_env_t { template - void init (const ByteStr &str, ACC &acc, unsigned int fd, + void init (const byte_str_t &str, ACC &acc, unsigned int fd, const int *coords_=nullptr, unsigned int num_coords_=0) { SUPER::init (str, *acc.globalSubrs, *acc.privateDicts[fd].localSubrs); @@ -100,9 +100,9 @@ struct CFF2CSInterpEnv : CSInterpEnv SUPER::fini (); } - OpCode fetch_op () + op_code_t fetch_op () { - if (this->substr.avail ()) + if (this->str_ref.avail ()) return SUPER::fetch_op (); /* make up return or endchar op */ @@ -112,16 +112,16 @@ struct CFF2CSInterpEnv : CSInterpEnv return OpCode_return; } - const BlendArg& eval_arg (unsigned int i) + const blend_arg_t& eval_arg (unsigned int i) { - BlendArg &arg = argStack[i]; + blend_arg_t &arg = argStack[i]; blend_arg (arg); return arg; } - const BlendArg& pop_arg () + const blend_arg_t& pop_arg () { - BlendArg &arg = argStack.pop (); + blend_arg_t &arg = argStack.pop (); blend_arg (arg); return arg; } @@ -163,14 +163,14 @@ struct CFF2CSInterpEnv : CSInterpEnv bool seen_vsindex () const { return seen_vsindex_; } protected: - void blend_arg (BlendArg &arg) + void blend_arg (blend_arg_t &arg) { if (do_blend && arg.blending ()) { - if (likely (scalars.len == arg.deltas.len)) + if (likely (scalars.length == arg.deltas.length)) { double v = arg.to_real (); - for (unsigned int i = 0; i < scalars.len; i++) + for (unsigned int i = 0; i < scalars.length; i++) { v += (double)scalars[i] * arg.deltas[i].to_real (); } @@ -191,12 +191,12 @@ struct CFF2CSInterpEnv : CSInterpEnv bool seen_vsindex_; bool seen_blend; - typedef CSInterpEnv SUPER; + typedef cs_interp_env_t SUPER; }; -template > -struct CFF2CSOpSet : CSOpSet +template > +struct cff2_cs_opset_t : cs_opset_t { - static void process_op (OpCode op, CFF2CSInterpEnv &env, PARAM& param) + static void process_op (op_code_t op, cff2_cs_interp_env_t &env, PARAM& param) { switch (op) { case OpCode_callsubr: @@ -228,7 +228,7 @@ struct CFF2CSOpSet : CSOpSet } } - static void process_blend (CFF2CSInterpEnv &env, PARAM& param) + static void process_blend (cff2_cs_interp_env_t &env, PARAM& param) { unsigned int n, k; @@ -245,7 +245,7 @@ struct CFF2CSOpSet : CSOpSet } for (unsigned int i = 0; i < n; i++) { - const hb_array_t blends = env.argStack.get_subarray (start + n + (i * k)); + const hb_array_t blends = env.argStack.get_subarray (start + n + (i * k)); env.argStack[start + i].set_blends (n, i, k, blends); } @@ -253,18 +253,18 @@ struct CFF2CSOpSet : CSOpSet env.argStack.pop (k * n); } - static void process_vsindex (CFF2CSInterpEnv &env, PARAM& param) + static void process_vsindex (cff2_cs_interp_env_t &env, PARAM& param) { env.process_vsindex (); env.clear_args (); } private: - typedef CSOpSet SUPER; + typedef cs_opset_t SUPER; }; template -struct CFF2CSInterpreter : CSInterpreter {}; +struct cff2_cs_interpreter_t : cs_interpreter_t {}; } /* namespace CFF */ -- cgit v1.2.3