From 2ed8edf358c0825cc83e32b5237be46486e4e2f3 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 7 Mar 2025 13:23:07 -0800
Subject: [PATCH] Fixed overlapping letters in SDF surface text
---
src/SDL_ttf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index 4c0ecab9..6e1416de 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -566,7 +566,7 @@ static void BG_Blended_Opaque_SDF(const TTF_Image *image, Uint32 *destination, S
while (height--) {
/* *INDENT-OFF* */
DUFFS_LOOP4(
- *dst++ = ((Uint32)*src++) << 24;
+ *dst++ |= ((Uint32)*src++) << 24;
, width);
/* *INDENT-ON* */
src += srcskip;
@@ -588,7 +588,7 @@ static void BG_Blended_SDF(const TTF_Image *image, Uint32 *destination, Sint32 s
while (height--) {
/* *INDENT-OFF* */
DUFFS_LOOP4(
- *dst++ = ((Uint32)*src++) << 24;
+ *dst++ |= ((Uint32)*src++) << 24;
, width);
/* *INDENT-ON* */
src += srcskip;