Skip to content

Commit 40344b7

Browse files
committed
fix(emcn): give the Geist font tokens a fallback stack
The package split replaced the auth screens' "Sim Auth Geist", Arial, sans-serif with a bare "EMCN Geist", so sign-in, consent and docs painted in the browser's serif default until the font loaded. The foundations sync now appends a sans or monospace fallback, and the host bridge mirrors it.
1 parent 0eb9b4a commit 40344b7

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎packages/emcn-platform/src/styles/host-bridge.module.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
--design-ui-muted: rgb(10 10 10 / 60%);
1515
--design-ui-divider: rgb(0 0 0 / 6%);
1616
--design-ui-hover: rgb(10 10 10 / 6%);
17-
--design-font-sans: "EMCN Geist";
17+
--design-font-sans: "EMCN Geist", Arial, sans-serif;
1818
--design-font-weight-regular: 400;
1919
--design-font-weight-medium: 500;
2020
--design-text-body: 0.875rem;

‎packages/emcn/src/styles/generated/tokens.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,11 +409,11 @@
409409
--size-button-icon: var(--container-16);
410410
--size-button-icon-large: var(--container-20);
411411
--width-nav-logo: var(--container-40);
412-
--font-mono: "EMCN Geist Mono";
412+
--font-mono: "EMCN Geist Mono", ui-monospace, monospace;
413413
--font-mono-mobile: var(--font-mono);
414414
--font-mono-tablet: var(--font-mono);
415415
--font-native: system-ui, sans-serif;
416-
--font-sans: "EMCN Geist";
416+
--font-sans: "EMCN Geist", Arial, sans-serif;
417417
--font-sans-mobile: var(--font-sans);
418418
--font-sans-tablet: var(--font-sans);
419419
--text-10: 0.625rem;

‎scripts/sync-platform-foundations.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ function fontFamily(value: string) {
5454

5555
const scalable = new Set(['fontSize', 'lineHeight', 'container', 'spacing', 'breakpoint', 'radius'])
5656
function tokenValue(token: Token) {
57-
if (token.type === 'fontFamily') return fontFamily(token.value)
57+
// A fallback keeps first paint in a sans face while the self-hosted Geist loads.
58+
if (token.type === 'fontFamily')
59+
return `${fontFamily(token.value)}, ${token.value.includes('Mono') ? 'ui-monospace, monospace' : 'Arial, sans-serif'}`
5860
const size = /^(\d+(?:\.\d+)?)px$/.exec(token.value)
5961
return size && scalable.has(token.type) && Number(size[1]) >= 4
6062
? `${Number(size[1]) / 16}rem`

0 commit comments

Comments
 (0)