diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-03-23 07:45:57 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-04-06 12:55:18 +0100 |
commit | 70af64433f491ee28e8b4ff19ebf413d45960155 (patch) | |
tree | 46dd5971011d619377ed233469f33c33f303d79e /src/3rdparty/harfbuzz-ng/src/hb-cff2-interp-cs.hh | |
parent | 29450dfa283bc08f1999ac6dfc5c4956cc9af044 (diff) |
Update to Harfbuzz 2.8.0
This updates Harfbuzz to the latest version and also
adds an import script to help with this work in the
future.
Task-number: QTBUG-90217
Pick-to: 6.1
Change-Id: I23eae7b7bbbd5001df9873e4784a0c4213de5508
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-cff2-interp-cs.hh')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-cff2-interp-cs.hh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-cff2-interp-cs.hh b/src/3rdparty/harfbuzz-ng/src/hb-cff2-interp-cs.hh index a72100e1ab..332ece31cd 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-cff2-interp-cs.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-cff2-interp-cs.hh @@ -52,7 +52,7 @@ struct blend_arg_t : number_t 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<const blend_arg_t> blends_) + unsigned int numBlends, hb_array_t<const blend_arg_t> blends_) { numValues = numValues_; valueIndex = valueIndex_; @@ -80,7 +80,7 @@ struct cff2_cs_interp_env_t : cs_interp_env_t<blend_arg_t, CFF2Subrs> { template <typename ACC> void init (const byte_str_t &str, ACC &acc, unsigned int fd, - const int *coords_=nullptr, unsigned int num_coords_=0) + const int *coords_=nullptr, unsigned int num_coords_=0) { SUPER::init (str, acc.globalSubrs, acc.privateDicts[fd].localSubrs); @@ -90,7 +90,7 @@ struct cff2_cs_interp_env_t : cs_interp_env_t<blend_arg_t, CFF2Subrs> seen_blend = false; seen_vsindex_ = false; scalars.init (); - do_blend = (coords != nullptr) && num_coords && (varStore != &Null(CFF2VariationStore)); + do_blend = num_coords && coords && varStore->size; set_ivs (acc.privateDicts[fd].ivs); } @@ -133,10 +133,11 @@ struct cff2_cs_interp_env_t : cs_interp_env_t<blend_arg_t, CFF2Subrs> region_count = varStore->varStore.get_region_index_count (get_ivs ()); if (do_blend) { - scalars.resize (region_count); - varStore->varStore.get_scalars (get_ivs (), - (int *)coords, num_coords, - &scalars[0], region_count); + if (unlikely (!scalars.resize (region_count))) + set_error (); + else + varStore->varStore.get_scalars (get_ivs (), coords, num_coords, + &scalars[0], region_count); } seen_blend = true; } |