From cfb672f1e5cb0e855cec3e5baacee1507e973ce3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 12 Jan 2023 10:36:39 -0700 Subject: [PATCH] [glyf] Revert sign of advance widths back --- src/OT/glyf/Glyph.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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,