From c48f53d30901dfc20b7432c2947e66642010dc4e Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Mon, 3 Dec 2018 16:59:41 -0800 Subject: [PATCH] more double changes --- src/hb-cff2-interp-cs.hh | 4 ++-- test/api/test-ot-extents-cff.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-cff2-interp-cs.hh b/src/hb-cff2-interp-cs.hh index 935a1a1fc..d258b8148 100644 --- a/src/hb-cff2-interp-cs.hh +++ b/src/hb-cff2-interp-cs.hh @@ -49,7 +49,7 @@ struct BlendArg : Number inline void set_int (int v) { reset_blends (); Number::set_int (v); } inline void set_fixed (int32_t v) { reset_blends (); Number::set_fixed (v); } - inline void set_real (float v) { reset_blends (); Number::set_real (v); } + inline void set_real (double v) { reset_blends (); Number::set_real (v); } inline void set_blends (unsigned int numValues_, unsigned int valueIndex_, unsigned int numBlends, const BlendArg *blends_) @@ -172,7 +172,7 @@ struct CFF2CSInterpEnv : CSInterpEnv double v = arg.to_real (); for (unsigned int i = 0; i < scalars.len; i++) { - v += scalars[i] * arg.deltas[i].to_real (); + v += (double)scalars[i] * arg.deltas[i].to_real (); } arg.set_real (v); arg.deltas.resize (0); diff --git a/test/api/test-ot-extents-cff.c b/test/api/test-ot-extents-cff.c index bb70a6268..49b87997e 100644 --- a/test/api/test-ot-extents-cff.c +++ b/test/api/test-ot-extents-cff.c @@ -171,7 +171,7 @@ test_extents_cff2_vsindex (void) g_assert_cmpint (extents.x_bearing, ==, 11); g_assert_cmpint (extents.y_bearing, ==, 656); g_assert_cmpint (extents.width, ==, 653); - g_assert_cmpint (extents.height, ==, -657); + g_assert_cmpint (extents.height, ==, -656); result = hb_font_get_glyph_extents (font, 2, &extents); g_assert (result);