From be40d168698e0409e42ea87ce598083e77a2d962 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 12 Aug 2026 19:05:52 -0600 Subject: [PATCH] [outline] Widen origin negation Synthetic slant translates outlines by the negated glyph origin. Convert the full-range position to the float coordinate domain before negating it, avoiding signed integer overflow at INT_MIN. Tested with: meson test -C build --print-errorlogs Assisted-by: OpenAI Codex --- src/hb-font.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-font.hh b/src/hb-font.hh index cc17f9437..c7fb893eb 100644 --- a/src/hb-font.hh +++ b/src/hb-font.hh @@ -738,7 +738,7 @@ struct hb_font_t { hb_position_t xo = 0, yo = 0; get_glyph_h_origin (glyph, &xo, &yo, false); - outline.translate (-xo, -yo); + outline.translate (-(float) xo, -(float) yo); outline.slant (slant_xy); outline.translate (xo, yo); }