[vector] Widen PDF image-height negation

PDF image painting negated a signed glyph height before converting it
to the floating vector coordinate used by the backend. Convert first so
the minimum position is handled without signed overflow.

This is part of the complete position-overflow fix for issue #6151.

Testing: meson test -C build --print-errorlogs

Assisted-by: Codex <codex@openai.com>
This commit is contained in:
Behdad Esfahbod committed 2026-08-12 18:31:05 -06:00
1 parent 48cc5b17ca
commit 3dca1d5252
1 file changed
+1 -1
+1 -1
View File
@@ -818,7 +818,7 @@ hb_pdf_paint_image (hb_paint_funcs_t *,
float ix = (float) extents->x_bearing;
float iy = (float) extents->y_bearing + (float) extents->height;
float iw = (float) extents->width;
float ih = (float) -extents->height; /* negative because image Y goes up but height is negative in extents */
float ih = -(float) extents->height; /* negative because image Y goes up but height is negative in extents */
body.append_num (paint->sx (iw));
body.append_str (" 0 0 ");