From 1ff60ed7b8e60e38bb9a36ec8febad06c15daad5 Mon Sep 17 00:00:00 2001 From: "Fredrick W. Warren" Date: Mon, 30 May 2022 09:20:46 -0700 Subject: [PATCH] draw border around title and subtitle --- hcatitles.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hcatitles.py b/hcatitles.py index 80508ea..6b5fbe6 100644 --- a/hcatitles.py +++ b/hcatitles.py @@ -14,8 +14,10 @@ def update_image(original, title, subtitle): font1 = ImageFont.truetype('tahomabd.ttf', 50) font2 = ImageFont.truetype('tahomabd.ttf', 38) draw = ImageDraw.Draw(image) - draw.text((20,520), title, (255,255,255), font=font1) - draw.text((20,588), subtitle, (255,255,255), font=font2) + draw.text((20,520), title, font=font1, fill='white', + stroke_width=4, stroke_fill='black', spacing=4) + draw.text((20,588), subtitle, font=font2, fill='white', + stroke_width=3, stroke_fill='black', spacing=4) return image def update_thumbnail(image):