diff --git a/app/panzer.py b/app/panzer.py index 770f30a..6cbf26d 100644 --- a/app/panzer.py +++ b/app/panzer.py @@ -21,14 +21,13 @@ def panzer(string="bionicles are cooler than sex"): def create_panzer(string): img = Image.open("./app/static/panzer.jpeg") draw = ImageDraw.Draw(img) - font1 = ImageFont.truetype("./app/static/arial.ttf", size=30) - draw.text((10, 20), "Oh panzer of the lake, what is your wisdom?", font=font1) - font2 = ImageFont.truetype("./app/static/arial.ttf", size=30) + font = ImageFont.truetype("./app/static/arial.ttf", size=30) + draw.text((10, 20), "Oh panzer of the lake, what is your wisdom?", font=font) topleft = (250, 500) wrapped = wrap(string, width=25) wrapped = [text.replace("%0A", "\n") for text in wrapped] for y, text in enumerate(wrapped): - draw.text((topleft[0], topleft[1] + (y * 33)), text, font=font2) + draw.text((topleft[0], topleft[1] + (y * 33)), text, font=font) return img