feat: bundle Inter + JetBrains Mono via @font-face + preset typography refs

The host does not consume LoadedPlugin.BundledFonts, so fonts.json families
render as fallback sans. Declare @font-face against the served
/templates/corporate-modernist/fonts/*.woff2 paths and set
typography.fontHeading/body/mono to template:corporate-modernist:<Family> in
all 5 presets so --font-heading/--font-body/--font-mono resolve to the bundled
Inter / JetBrains Mono faces. Families + weights match fonts.json exactly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-07-06 21:02:02 +08:00
parent 86a2c71e9f
commit 9fcf0892a3
2 changed files with 38 additions and 0 deletions

View File

@ -124,6 +124,19 @@ css:
Swiss grid + Bauhaus geometric marks + oversized numerals.
============================================================ */
/* Bundled faces. The host does not yet emit @font-face for
bundled_fonts (LoadedPlugin.BundledFonts is unconsumed), so the theme
declares its own faces against the served artifact paths
(/templates/corporate-modernist/fonts/...). Presets set
typography.fontHeading/body/mono to template:corporate-modernist:<Family>
so --font-heading/--font-body/--font-mono resolve to these families.
Families + weights match fonts.json exactly. */
@font-face { font-family: 'Inter'; src: url('/templates/corporate-modernist/fonts/inter-latin-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/templates/corporate-modernist/fonts/inter-latin-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/templates/corporate-modernist/fonts/inter-latin-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/templates/corporate-modernist/fonts/inter-latin-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/templates/corporate-modernist/fonts/jetbrains-mono-latin.woff2') format('woff2'); font-weight: 400 500; font-style: normal; font-display: swap; }
/* --- Layout primitives --- */
.cm-content-well { width: 100%; max-width: 1280px; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; box-sizing: border-box; }
.cm-measure { max-width: 70ch; }

View File

@ -5,6 +5,11 @@
"description": "Deep navy on paper. The safe choice for accountancy, law, and finance.",
"theme": {
"mode": "both",
"typography": {
"fontHeading": "template:corporate-modernist:Inter",
"fontBody": "template:corporate-modernist:Inter",
"fontMono": "template:corporate-modernist:JetBrains Mono"
},
"lightColors": {
"background": "0 0% 100%",
"foreground": "220 20% 12%",
@ -55,6 +60,11 @@
"description": "Same chassis, deep green accent for sustainability, advisory, and ESG.",
"theme": {
"mode": "both",
"typography": {
"fontHeading": "template:corporate-modernist:Inter",
"fontBody": "template:corporate-modernist:Inter",
"fontMono": "template:corporate-modernist:JetBrains Mono"
},
"lightColors": {
"background": "0 0% 100%",
"foreground": "150 18% 12%",
@ -105,6 +115,11 @@
"description": "Heritage accent for old-line legal, private banking, and partnerships.",
"theme": {
"mode": "both",
"typography": {
"fontHeading": "template:corporate-modernist:Inter",
"fontBody": "template:corporate-modernist:Inter",
"fontMono": "template:corporate-modernist:JetBrains Mono"
},
"lightColors": {
"background": "0 0% 100%",
"foreground": "355 18% 12%",
@ -155,6 +170,11 @@
"description": "Achromatic ink on gallery white. Pure Swiss restraint with no hue.",
"theme": {
"mode": "both",
"typography": {
"fontHeading": "template:corporate-modernist:Inter",
"fontBody": "template:corporate-modernist:Inter",
"fontMono": "template:corporate-modernist:JetBrains Mono"
},
"lightColors": {
"background": "0 0% 100%",
"foreground": "0 0% 9%",
@ -205,6 +225,11 @@
"description": "Graphite ground with a single Bauhaus primary-red accent for bold consultancies.",
"theme": {
"mode": "both",
"typography": {
"fontHeading": "template:corporate-modernist:Inter",
"fontBody": "template:corporate-modernist:Inter",
"fontMono": "template:corporate-modernist:JetBrains Mono"
},
"lightColors": {
"background": "0 0% 100%",
"foreground": "0 0% 11%",