Skip to content
NewTemplates & toolkits are on the way — join the waitlist
Hecham Gazhi

Design Systems · Lesson 05 / 13

Typography system

How to define the typography foundation of a design system: font families and fallbacks, a type scale, role-based text styles, responsive and fluid type, tokens, multilingual support and documentation.

4 min read · 5 quiz questions

What a typography system defines

A typography system turns type choices into a small, named set of styles that everyone uses. Without it, every designer picks sizes by eye and every developer adds a new font-size, and soon a product has 30 slightly different text styles.

  • Font families and fallbacks for each language and use (UI, headings, code).
  • A type scale — the allowed sizes.
  • Weights — usually 3–4.
  • Line heights and letter spacing for each size.
  • Text styles — named combinations, by role.
  • Responsive rules — how sizes change across breakpoints.

Font families and fallbacks

TokenUseExample stack
font-family-sansUI and body text"Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif
font-family-displayLarge headings (optional)A characterful brand font
font-family-arabicArabic text"IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif
font-family-monoCode, IDs, tabular data"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace

Always define fallbacks. Web fonts take time to load; a good fallback stack with similar proportions reduces layout shift. In CSS, font-display: swap shows fallback text immediately instead of invisible text.

The type scale

Choose a base size (16px) and a ratio, then round to whole numbers and adjust by eye. Keep the number of sizes small — 8 to 10 is usually plenty.

TokenSizeLine heightTypical use
font-size-10012px16pxCaptions, badges
font-size-20014px20pxSecondary text, dense tables
font-size-30016px24pxBody text
font-size-40018px28pxLarge body, lead text
font-size-50020px28pxSmall headings
font-size-60024px32pxSection headings
font-size-70030px38pxPage headings
font-size-80036px44pxLarge page headings
font-size-90048px56pxDisplay, hero

Live preview

display · 49pxDesign systems
h1 · 39pxDesign systems
h2 · 31pxDesign systems
h3 · 25pxDesign systems
body-lg · 20pxDesign systems
body · 16pxDesign systems
caption · 13pxDesign systems

Ratio 1.25 (major third) from a 16px base.

Text styles by role

Designers and developers shouldn't combine size, weight and line height themselves. Instead, the system offers composite text styles named by role. Each style is a token that bundles family, size, weight, line height and letter spacing.

Do

  • Name styles by role: heading, body, label, caption.
  • Include a label style for buttons and form labels.
  • Separate visual style from semantic HTML level (an h2 can use heading-sm).
  • Use the same names in Figma text styles and code.

Don't

  • Name styles by size: text-24-bold.
  • Allow custom font sizes outside the scale.
  • Tie styles to HTML tags so h1 must always be huge.
  • Create separate styles for every colour of text — colour is a separate token.
Examplecss
.text-display    { font: 600 3rem/1.15 var(--font-family-sans); letter-spacing: -0.02em; }
.text-heading-xl { font: 600 2.25rem/1.2 var(--font-family-sans); letter-spacing: -0.01em; }
.text-heading-lg { font: 600 1.875rem/1.25 var(--font-family-sans); }
.text-heading-md { font: 600 1.5rem/1.3 var(--font-family-sans); }
.text-heading-sm { font: 600 1.25rem/1.4 var(--font-family-sans); }
.text-body-lg    { font: 400 1.125rem/1.55 var(--font-family-sans); }
.text-body       { font: 400 1rem/1.5 var(--font-family-sans); }
.text-body-sm    { font: 400 0.875rem/1.45 var(--font-family-sans); }
.text-label      { font: 500 0.875rem/1.3 var(--font-family-sans); }
.text-caption    { font: 400 0.75rem/1.35 var(--font-family-sans); }
.text-code       { font: 400 0.875rem/1.5 var(--font-family-mono); }

Responsive and fluid type

Large headings that work on desktop are often too big on phones. Two common approaches:

Stepped

Each text style has different sizes at different breakpoints, e.g. display is 36px on mobile and 48px on desktop.

Fluid

Sizes scale smoothly with viewport width using CSS clamp(), with a minimum and maximum.

Examplecss
/* 36px on small screens → 56px on large screens */
.text-display { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); }

Body text usually stays the same size across breakpoints. It's headings and display text that benefit most from responsive sizing.

Multilingual typography

  • Define fonts per script and pair them for similar weight and x-height.
  • Arabic text often needs a slightly larger size and taller line height to match the visual weight of Latin text — define language-specific overrides for text styles.
  • Never apply letter spacing to Arabic.
  • Uppercase styles don't exist in Arabic — avoid using text-transform: uppercase to communicate meaning.
  • Test text styles with real translations, including long German words and mixed Arabic/Latin content.
Examplecss
:root[lang="ar"] {
  --font-family-sans: "IBM Plex Sans Arabic", "Noto Sans Arabic", sans-serif;
}
:root[lang="ar"] .text-body { line-height: 1.75; letter-spacing: 0; }

Accessibility in the type system

  • Use rem units so text scales with the user's browser setting.
  • Keep body text at 16px or larger; avoid 12px for anything important.
  • Support zoom up to 200% without loss of content (WCAG 1.4.4) and text-spacing adjustments (WCAG 1.4.12).
  • Make sure text colour tokens meet contrast with every surface they're used on.
  • Respect platform text-size settings (Dynamic Type on iOS, font scale on Android) in native apps.

Common mistake: Fixing heights on text containers (buttons, cards) so that larger text or longer translations get cut off. Let containers grow with their content.

Key takeaways

  • A typography system defines families, a scale, weights, line heights and named text styles.
  • Keep 8–10 sizes and bundle them into role-based composite styles.
  • Separate visual style from HTML heading level.
  • Use stepped or fluid (clamp) sizing for headings across breakpoints.
  • Plan for multiple scripts and accessibility: rem units, zoom, contrast, no fixed text heights.

Exercise

Define a type system

  1. Choose a Latin font, an Arabic companion and a monospace font with fallbacks.
  2. Create a 9-step type scale with line heights on a 4px grid.
  3. Define 10 role-based text styles as Figma text styles.
  4. Write the same styles in CSS with a fluid display size using clamp().
  5. Test them with an English and an Arabic version of the same screen.

Test yourself

Typography system quiz

5 questions. Score 70% or more to complete the lesson.

  1. 1.Which is a better text style name in a design system?
  2. 2.Why define fallback fonts?
  3. 3.What does CSS clamp() enable for typography?
  4. 4.Should an h2 always use the same visual style?
  5. 5.Why avoid fixed heights on text containers?