[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
This commit is contained in:
Behdad Esfahbod committed 2026-08-12 19:05:52 -06:00
1 parent 91bcdb6653
commit be40d16869
1 file changed
+1 -1
+1 -1
View File
@@ -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);
}