feat(landing): switch heading font to Block Blueprint

Replace Pixelify Sans with Block Blueprint as the heading font (theme.headFont).
Block Blueprint isn't on Google Fonts, so it's vendored straight from 1001fonts
(License: 1001Fonts Free For Personal Use — fine for this private friends'
server) as a TTF, with a hand-written @font-face appended to fonts.css. The
vendor step is added to fetch-fonts.sh (runs after the Google rewrite so it
survives re-runs). Pixelify stays available as a HEAD_FONTS option + the
hard-coded fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 22:17:52 +02:00
parent 362228f985
commit c3b2d89ddc
4 changed files with 39 additions and 2 deletions

Binary file not shown.

View File

@@ -268,3 +268,13 @@
src: url(/fonts/pxiKyp0ihIEF2isfFJU.woff2) format('woff2'); src: url(/fonts/pxiKyp0ihIEF2isfFJU.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
} }
/* Block Blueprint — vendored from 1001fonts (NOT on Google Fonts; appended by
fetch-fonts.sh after the Google rewrite). License: 1001Fonts Free For Personal
Use. Single weight, TTF (no woff2 toolchain on the build box). */
@font-face {
font-family: 'Block Blueprint';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/fonts/BlockBlueprint.ttf) format('truetype');
}

View File

@@ -120,12 +120,12 @@ export const site = {
// Design knobs (replace the design's in-browser TweaksPanel). Baked at build. // Design knobs (replace the design's in-browser TweaksPanel). Baked at build.
// mood: "grass" | "nether" | "end" // mood: "grass" | "nether" | "end"
// hero: "centered" | "split" | "spotlight" // hero: "centered" | "split" | "spotlight"
// headFont: "pixelify" | "8bit" | "silkscreen" // headFont: "blockblueprint" | "pixelify" | "8bit" | "silkscreen"
// dust: floating pixel particles in the hero // dust: floating pixel particles in the hero
theme: { theme: {
mood: "grass", mood: "grass",
hero: "centered", hero: "centered",
headFont: "pixelify", headFont: "blockblueprint",
dust: true, dust: true,
}, },
@@ -216,6 +216,7 @@ export const LITERALS = {
// Head-font CSS stacks, keyed by theme.headFont. // Head-font CSS stacks, keyed by theme.headFont.
export const HEAD_FONTS: Record<string, string> = { export const HEAD_FONTS: Record<string, string> = {
blockblueprint: "'Block Blueprint', system-ui, sans-serif",
pixelify: "'Pixelify Sans', system-ui, sans-serif", pixelify: "'Pixelify Sans', system-ui, sans-serif",
"8bit": "'Press Start 2P', monospace", "8bit": "'Press Start 2P', monospace",
silkscreen: "'Silkscreen', system-ui, sans-serif", silkscreen: "'Silkscreen', system-ui, sans-serif",

View File

@@ -41,4 +41,30 @@ echo "→ writing fonts.css (URLs rewritten to /fonts/…)"
# Rewrite absolute gstatic URLs to local /fonts/<basename>. # Rewrite absolute gstatic URLs to local /fonts/<basename>.
echo "$raw" | sed -E 's#https://fonts\.gstatic\.com/[^)]+/([^)/]+\.woff2)#/fonts/\1#g' > "$out/fonts.css" echo "$raw" | sed -E 's#https://fonts\.gstatic\.com/[^)]+/([^)/]+\.woff2)#/fonts/\1#g' > "$out/fonts.css"
# Block Blueprint — the heading font. NOT on Google Fonts, so it can't ride the
# css2 request above; vendored straight from 1001fonts (License: 1001Fonts Free
# For Personal Use — fine for this private friends' server). TTF only, no woff2
# (no woff2 toolchain assumed). Appended AFTER the rewrite so it survives re-runs.
echo "→ vendoring Block Blueprint (1001fonts)"
bb_ttf="$out/BlockBlueprint.ttf"
if [ ! -f "$bb_ttf" ]; then
tmpzip="$(mktemp)"
curl -fsSL -A "$UA" -o "$tmpzip" "https://www.1001fonts.com/download/blockblueprint.zip"
unzip -p "$tmpzip" BlockBlueprint.ttf > "$bb_ttf"
rm -f "$tmpzip"
echo " BlockBlueprint.ttf"
fi
cat >> "$out/fonts.css" <<'EOF'
/* Block Blueprint — vendored from 1001fonts (NOT on Google Fonts; appended by
fetch-fonts.sh after the Google rewrite). License: 1001Fonts Free For Personal
Use. Single weight, TTF (no woff2 toolchain on the build box). */
@font-face {
font-family: 'Block Blueprint';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/fonts/BlockBlueprint.ttf) format('truetype');
}
EOF
echo "✓ fonts vendored into $out" echo "✓ fonts vendored into $out"