#!/usr/bin/env python3
"""1080x1920 end card in the RestoreBunny brand (warm paper, ink, green accent, Newsreader + Geist)."""
from PIL import Image, ImageDraw, ImageFont
A = "/Users/sarthakrawool/Documents/Agency"
F = A + "/engine/fonts/"
W, H = 1080, 1920
im = Image.new("RGB", (W, H), "#f4f1ea"); d = ImageDraw.Draw(im)
mark = Image.open(A + "/products/restorebunny/assets/profile_1080.png").convert("RGBA").resize((300, 300))
m = Image.new("L", (300, 300), 0); ImageDraw.Draw(m).ellipse((0, 0, 299, 299), fill=255)
im.paste(mark, ((W - 300) // 2, 520), m)
def centre(y, text, font, fill):
    w = d.textlength(text, font=font); d.text(((W - w) / 2, y), text, font=font, fill=fill)
h1 = ImageFont.truetype(F + "Newsreader-Italic.ttf", 78)
centre(900, "Some photos are", h1, "#111113"); centre(990, "worth bringing back.", h1, "#111113")
url = ImageFont.truetype(F + "Geist.ttf", 76); url.set_variation_by_axes([700]) if hasattr(url, "set_variation_by_axes") else None
centre(1150, "restorebunny.com", url, "#1f6f4f")
small = ImageFont.truetype(F + "Geist.ttf", 40)
centre(1260, "Repair · colourise · upscale old photos", small, "#55555c")
im.save("edit/endcard.png"); print("edit/endcard.png")
