diff --git a/src/hb-ot-shape-fallback.cc b/src/hb-ot-shape-fallback.cc index e00eb9af7..acf55c76a 100644 --- a/src/hb-ot-shape-fallback.cc +++ b/src/hb-ot-shape-fallback.cc @@ -573,7 +573,7 @@ _hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan HB_UNUSED, if (horizontal) pos[i].x_advance = +font->x_scale / 4; else - pos[i].y_advance = -font->y_scale / 4; + pos[i].y_advance = -(int64_t) font->y_scale / 4; } hb_unicode_funcs_t::space_t space_type = _hb_glyph_info_get_unicode_space_fallback_type (&info[i]); @@ -593,16 +593,16 @@ _hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan HB_UNUSED, case t::SPACE_EM_6: case t::SPACE_EM_16: if (horizontal) - pos[i].x_advance = +(font->x_scale + ((int) space_type)/2) / (int) space_type; + pos[i].x_advance = ((int64_t) font->x_scale + ((int) space_type)/2) / (int) space_type; else - pos[i].y_advance = -(font->y_scale + ((int) space_type)/2) / (int) space_type; + pos[i].y_advance = -((int64_t) font->y_scale + ((int) space_type)/2) / (int) space_type; break; case t::SPACE_4_EM_18: if (horizontal) - pos[i].x_advance = (int64_t) +font->x_scale * 4 / 18; + pos[i].x_advance = (int64_t) font->x_scale * 4 / 18; else - pos[i].y_advance = (int64_t) -font->y_scale * 4 / 18; + pos[i].y_advance = -(int64_t) font->y_scale * 4 / 18; break; case t::SPACE_FIGURE: