From 3dca1d52525763fb438333b86fc2d8ff54d109f7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 12 Aug 2026 18:31:05 -0600 Subject: [PATCH] [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 --- src/hb-vector-paint-pdf.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-vector-paint-pdf.cc b/src/hb-vector-paint-pdf.cc index 5b2f0326b..284b3035a 100644 --- a/src/hb-vector-paint-pdf.cc +++ b/src/hb-vector-paint-pdf.cc @@ -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 ");