Rebrand: Renamr -> Aurora Curator (new logo/app icon, renamed crate aurora-curator-core, package/identifier/window-title updates, README + in-app text)
This commit is contained in:
+13
-35
@@ -1,46 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generates Renamr's app icon set (placeholder branding, easy to swap later).
|
||||
"""Generates Aurora Curator's app icon set from the real logo mark.
|
||||
|
||||
Source master: scripts/logo/icon-source.png (the folder/aurora/filmstrip mark,
|
||||
square-padded, transparent background - cropped from the full lockup that also
|
||||
includes the "AURORA CURATOR" wordmark, which isn't used for the app icon itself).
|
||||
|
||||
Produces the sizes Tauri's bundler expects in src-tauri/icons/.
|
||||
"""
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
from PIL import Image
|
||||
import os
|
||||
|
||||
OUT = os.path.join(os.path.dirname(__file__), "..", "src-tauri", "icons")
|
||||
HERE = os.path.dirname(__file__)
|
||||
SRC = os.path.join(HERE, "logo", "icon-source.png")
|
||||
OUT = os.path.join(HERE, "..", "src-tauri", "icons")
|
||||
os.makedirs(OUT, exist_ok=True)
|
||||
|
||||
SIZE = 1024
|
||||
BG_TOP = (91, 76, 245) # indigo
|
||||
BG_BOTTOM = (56, 189, 178) # teal
|
||||
FG = (255, 255, 255)
|
||||
master = Image.open(SRC).convert("RGBA")
|
||||
if master.size != (1024, 1024):
|
||||
master = master.resize((1024, 1024), Image.LANCZOS)
|
||||
|
||||
def make_master():
|
||||
img = Image.new("RGB", (SIZE, SIZE), BG_TOP)
|
||||
px = img.load()
|
||||
for y in range(SIZE):
|
||||
t = y / SIZE
|
||||
r = int(BG_TOP[0] * (1 - t) + BG_BOTTOM[0] * t)
|
||||
g = int(BG_TOP[1] * (1 - t) + BG_BOTTOM[1] * t)
|
||||
b = int(BG_TOP[2] * (1 - t) + BG_BOTTOM[2] * t)
|
||||
for x in range(SIZE):
|
||||
px[x, y] = (r, g, b)
|
||||
|
||||
# rounded-square mask
|
||||
mask = Image.new("L", (SIZE, SIZE), 0)
|
||||
ImageDraw.Draw(mask).rounded_rectangle([0, 0, SIZE - 1, SIZE - 1], radius=SIZE // 5, fill=255)
|
||||
canvas = Image.new("RGBA", (SIZE, SIZE), (0, 0, 0, 0))
|
||||
canvas.paste(img, (0, 0), mask)
|
||||
|
||||
draw = ImageDraw.Draw(canvas)
|
||||
font = ImageFont.truetype("/usr/share/fonts/truetype/google-fonts/Poppins-Bold.ttf", int(SIZE * 0.56))
|
||||
text = "R"
|
||||
bbox = draw.textbbox((0, 0), text, font=font)
|
||||
tw, th = bbox[2] - bbox[0], bbox[3] - bbox[1]
|
||||
draw.text(((SIZE - tw) / 2 - bbox[0], (SIZE - th) / 2 - bbox[1] - SIZE * 0.02), text, font=font, fill=FG)
|
||||
|
||||
return canvas
|
||||
|
||||
master = make_master()
|
||||
master.save(os.path.join(OUT, "icon-master.png"))
|
||||
|
||||
sizes = [32, 128, 256, 512, 1024]
|
||||
@@ -62,4 +40,4 @@ try:
|
||||
except Exception as e:
|
||||
print(f"WARN: could not write icon.icns via Pillow ({e}); leaving it out")
|
||||
|
||||
print("done:", os.listdir(OUT))
|
||||
print("done:", sorted(os.listdir(OUT)))
|
||||
|
||||
Reference in New Issue
Block a user