From 8946f6eba7b625e26be4ab5d16eca80145c2a06c Mon Sep 17 00:00:00 2001 From: David Kilias Date: Fri, 10 Apr 2020 16:11:21 +0200 Subject: [PATCH] fix fontsizes and label dimensions --- address-label.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/address-label.py b/address-label.py index c81bc18..b49d0c3 100644 --- a/address-label.py +++ b/address-label.py @@ -3,12 +3,12 @@ import sys address = "".join(sys.stdin.readlines()) -img = Image.new('RGB', (696, 160), color = (255, 255, 255)) +img = Image.new('RGB', (696, 220), color = (255, 255, 255)) -fnt0 = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 14) -fnt = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 32) +fnt0 = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 24) +fnt = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 54) d = ImageDraw.Draw(img) -d.text((20,10), "Netz39 e.V., Leibnizstr. 32, 39104 Magdeburg", font=fnt0, fill=(0,0,0)) +d.text((20,5), "Netz39 e.V., Leibnizstr. 32, 39104 Magdeburg", font=fnt0, fill=(0,0,0)) d.text((20,25), address.strip('\"'), font=fnt, fill=(0, 0, 0)) img.save('address-label.png') \ No newline at end of file