#!/usr/bin/env python3
"""make-logo.py <out-dir>: draws the invented Fernwick Studio logo (white, transparent PNG, 800x300) and a solid black 800x300 control logo.
Needs Pillow and Inter-Bold.ttf (OFL) next to this script."""
import sys, os
from PIL import Image, ImageDraw, ImageFont
out = sys.argv[1]; here = os.path.dirname(os.path.abspath(__file__))
W, H = 800, 300
im = Image.new("RGBA", (W, H), (0, 0, 0, 0)); d = ImageDraw.Draw(im)
d.ellipse((20, 40, 220, 240), fill=(255, 255, 255, 255))
d.polygon([(120, 70), (170, 140), (120, 210), (70, 140)], fill=(0, 0, 0, 0))   # cut-out diamond
d.rectangle((113, 140, 127, 225), fill=(255, 255, 255, 255))
f1 = ImageFont.truetype(os.path.join(here, "Inter-Bold.ttf"), 96)
f2 = ImageFont.truetype(os.path.join(here, "Inter-Bold.ttf"), 52)
d.text((250, 60), "Fernwick", font=f1, fill=(255, 255, 255, 255))
d.text((254, 175), "STUDIO", font=f2, fill=(255, 255, 255, 255))
im.save(os.path.join(out, "logo-fernwick.png"))
Image.new("RGBA", (W, H), (0, 0, 0, 255)).save(os.path.join(out, "logo-black-box.png"))
print("ok", out)
