From 51bddeeefe55a37fd8397f193b027471a556c27b Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 18 Jan 2025 17:27:25 +1100 Subject: [PATCH] Do not draw normal text onto stroke text if they are the same color --- src/PIL/ImageDraw.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PIL/ImageDraw.py b/src/PIL/ImageDraw.py index d8e4c0c60de..d234a402210 100644 --- a/src/PIL/ImageDraw.py +++ b/src/PIL/ImageDraw.py @@ -692,7 +692,8 @@ def draw_text(ink: int, stroke_width: float = 0) -> None: draw_text(stroke_ink, stroke_width) # Draw normal text - draw_text(ink, 0) + if ink != stroke_ink: + draw_text(ink) else: # Only draw normal text draw_text(ink)