From 5206d30000081bdaed89ca24e8e73d985ab22e5d Mon Sep 17 00:00:00 2001
From: Andrew Murray <radarhere@users.noreply.github.com>
Date: Wed, 11 Mar 2026 23:02:37 +1100
Subject: [PATCH] Use long for glyph position

---
 src/_imagingft.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/_imagingft.c b/src/_imagingft.c
index 5d91eaad6c3..06ef6e810e6 100644
--- a/src/_imagingft.c
+++ b/src/_imagingft.c
@@ -580,9 +580,9 @@ bounding_box_and_anchors(
     int *x_offset,
     int *y_offset
 ) {
-    int position; /* pen position along primary axis, in 26.6 precision */
-    int advanced; /* pen position along primary axis, in pixels */
-    int px, py;   /* position of current glyph, in pixels */
+    long position; /* pen position along primary axis, in 26.6 precision */
+    long advanced; /* pen position along primary axis, in pixels */
+    int px, py;    /* position of current glyph, in pixels */
     int x_min, x_max, y_min, y_max; /* text bounding box, in pixels */
     int x_anchor, y_anchor;         /* offset of point drawn at (0, 0), in pixels */
     int error;
