#!/usr/bin/env python3
"""Generate the Furtka brand files from the winning logo (Mark M) everywhere
it ships: website, live installer, on-box UI, ISO boot splash, repo docs.
python3 website/tools/brand-assets.py
Reuses the geometry and rasteriser of logo-assets.py (the poll showcase), so
the mark is drawn from one source. Needs the same build-only deps: cairosvg,
Pillow, fontTools. Output files are committed; re-run after a geometry change.
"""
import importlib.util
import os
import sys
HERE = os.path.dirname(os.path.abspath(__file__))
REPO = os.path.abspath(os.path.join(HERE, "..", ".."))
_spec = importlib.util.spec_from_file_location("logo_assets", os.path.join(HERE, "logo-assets.py"))
la = importlib.util.module_from_spec(_spec)
_spec.loader.exec_module(la)
K = "m"
COLOR = la.MARKS[K]["color"] # light-theme accent
COLOR_DARK = "#ff6b56" # dark-theme accent used by the site and the box UI
INK = la.MARKS[K]["ink"]
def out(*parts):
path = os.path.join(REPO, *parts)
os.makedirs(os.path.dirname(path), exist_ok=True)
return path
def favicon_svg():
"""Small-size tier, accent colour, lighter accent on dark browser chrome."""
inner = la.body(K, "min", "currentColor")
x, y, w, h = la.MARKS[K]["vb"]
return (
f'\n"
)
def mark_svg(tier, color):
return (
la.svg(K, tier, color, standalone=True)
.replace(' class="pm"', "")
.replace(' aria-hidden="true" focusable="false"', "")
+ "\n"
)
def lockup_svg(color):
s = la.lockup(K).replace("currentColor", color)
return (
s.replace('