From 769e3d729a38448a9991c9d6f887f97f6ae9a489 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 29 Jan 2025 09:39:21 -0800
Subject: [PATCH] Fixed height calculation for text
The height should always be the height of the font, plus any outliers extending beyond that.
---
src/SDL_ttf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index ae851846..48afcc15 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -3609,7 +3609,7 @@ static bool TTF_Size_Internal(TTF_Font *font, const char *text, size_t length, T
if (positions->len > 0) {
minx = INT_MAX;
maxx = INT_MIN;
- miny = INT_MAX;
+ miny = 0;
maxy = font->height;
if (positions->pos[0].offset == 0) {