diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index 155a4b5d3..9834acefc 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -93,15 +93,15 @@ struct Glyph float topSideY = all_points[len - 2].y; float bottomSideY = all_points[len - 1].y; - unsigned hori_aw = roundf (rightSideX - leftSideX); + signed hori_aw = roundf (rightSideX - leftSideX); if (hori_aw < 0) hori_aw = 0; int lsb = roundf (xMin - leftSideX); - plan->hmtx_map.set (new_gid, hb_pair (hori_aw, lsb)); + plan->hmtx_map.set (new_gid, hb_pair ((unsigned) hori_aw, lsb)); - unsigned vert_aw = roundf (topSideY - bottomSideY); + signed vert_aw = roundf (topSideY - bottomSideY); if (vert_aw < 0) vert_aw = 0; int tsb = roundf (topSideY - yMax); - plan->vmtx_map.set (new_gid, hb_pair (vert_aw, tsb)); + plan->vmtx_map.set (new_gid, hb_pair ((unsigned) vert_aw, tsb)); } bool compile_header_bytes (const hb_subset_plan_t *plan,