diff --git a/src/design/assets/fonts/figtree.woff2 b/src/design/assets/fonts/figtree.woff2 new file mode 100644 index 0000000..fcf1c90 Binary files /dev/null and b/src/design/assets/fonts/figtree.woff2 differ diff --git a/src/design/assets/fonts/inter.woff2 b/src/design/assets/fonts/inter.woff2 new file mode 100644 index 0000000..e0cab47 Binary files /dev/null and b/src/design/assets/fonts/inter.woff2 differ diff --git a/src/design/base.css b/src/design/base.css index 0443777..3031c13 100644 --- a/src/design/base.css +++ b/src/design/base.css @@ -11,7 +11,7 @@ h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; - font-family: var(--font-sans); + font-family: var(--font-display); margin-block-start: 1.5em; margin-block-end: 0.5em; } diff --git a/src/design/fonts.css b/src/design/fonts.css new file mode 100644 index 0000000..b308df0 --- /dev/null +++ b/src/design/fonts.css @@ -0,0 +1,15 @@ +@font-face { + font-family: 'Figtree'; + font-style: normal; + font-weight: 300 900; + font-display: swap; + src: url('../assets/fonts/figtree.woff2') format('woff2'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url('../assets/fonts/inter.woff2') format('woff2'); +} diff --git a/src/design/index.css b/src/design/index.css index 8105289..dbc9943 100644 --- a/src/design/index.css +++ b/src/design/index.css @@ -1,5 +1,6 @@ @layer reset, tokens, base, compositions, layout, components, utilities; +@import url("./fonts.css") layer(tokens); @import url("./reset.css") layer(reset); @import url("./tokens.css") layer(tokens); @import url("./base.css") layer(base); diff --git a/src/design/layout.css b/src/design/layout.css index 58c06a0..e6e4105 100644 --- a/src/design/layout.css +++ b/src/design/layout.css @@ -52,7 +52,6 @@ gap: var(--space-4); } .home-hero h1 { - font-family: var(--font-mono); font-size: var(--step-4); max-inline-size: 22ch; } diff --git a/src/design/tokens.css b/src/design/tokens.css index 40cfe31..2260fb3 100644 --- a/src/design/tokens.css +++ b/src/design/tokens.css @@ -69,8 +69,9 @@ --shadow-card: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 12px rgb(0 0 0 / 0.06); /* ---------- Font stacks ---------- */ - --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace; + --font-display: 'Figtree', ui-sans-serif, system-ui, sans-serif; + --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace; /* ---------- Measure ---------- */ --measure-prose: 65ch; diff --git a/src/pages/design-system.tsx b/src/pages/design-system.tsx index 0915630..e316fbb 100644 --- a/src/pages/design-system.tsx +++ b/src/pages/design-system.tsx @@ -125,12 +125,12 @@ function TypographySection() { return (

Typography

-

System font stack with a major-third (1.25) fluid type scale. Line height 1.5 for body, 1.15 for headings.

+

Figtree for headings, Inter for body text, with a major-third (1.25) fluid type scale. Line height 1.5 for body, 1.15 for headings.

-
Step 4 — Page title
-
Step 3 — Section heading
-
Step 2 — Subsection
-
Step 1 — Card title
+
Step 4 — Page title
+
Step 3 — Section heading
+
Step 2 — Subsection
+
Step 1 — Card title
Step 0 — Body text
Step −1 — Small text, labels