Typography
IBM Plex Sans Arabic, the DGA type scale and its responsive modes.
Version 0.2.0 ·
DGA uses IBM Plex Sans Arabic for Arabic and Latin text, in four weights. dga-style loads it with next/font (Arabic and Latin subsets) and exposes it as font-sans.
Switch the viewport: display sizes follow the Figma Desktop, Tablet and Mobile modes.
Scale
| Utility | Figma style | Desktop | Tablet | Mobile | Letter spacing |
|---|---|---|---|---|---|
Utility:text-display-2xl | Figma style:Display 2xl | Desktop:72px / 90px | Tablet:56px / 72px | Mobile:48px / 64px | Letter spacing:-2% |
Utility:text-display-xl | Figma style:Display xl | Desktop:60px / 72px | Tablet:48px / 64px | Mobile:40px / 56px | Letter spacing:-2% |
Utility:text-display-lg | Figma style:Display lg | Desktop:48px / 60px | Tablet:36px / 48px | Mobile:32px / 40px | Letter spacing:-2% |
Utility:text-display-md | Figma style:Display md | Desktop:36px / 44px | Tablet:30px / 40px | Mobile:24px / 32px | Letter spacing:-2% |
Utility:text-display-sm | Figma style:Display sm | Desktop:30px / 38px | Tablet:24px / 32px | Mobile:20px / 28px | Letter spacing:0% |
Utility:text-display-xs | Figma style:Display xs | Desktop:24px / 32px | Tablet:20px / 28px | Mobile:18px / 24px | Letter spacing:0% |
Utility:text-xl | Figma style:Text xl | Desktop:20px / 30px | Tablet:20px / 30px | Mobile:20px / 30px | Letter spacing:0% |
Utility:text-lg | Figma style:Text lg | Desktop:18px / 28px | Tablet:18px / 28px | Mobile:18px / 28px | Letter spacing:0% |
Utility:text-md | Figma style:Text md | Desktop:16px / 24px | Tablet:16px / 24px | Mobile:16px / 24px | Letter spacing:0% |
Utility:text-sm | Figma style:Text sm | Desktop:14px / 20px | Tablet:14px / 20px | Mobile:14px / 20px | Letter spacing:0% |
Utility:text-xs | Figma style:Text xs | Desktop:12px / 18px | Tablet:12px / 18px | Mobile:12px / 18px | Letter spacing:0% |
Utility:text-2xs | Figma style:Text 2xs | Desktop:10px / 14px | Tablet:10px / 14px | Mobile:10px / 14px | Letter spacing:0% |
Body sizes (text-xl to text-2xs) keep their desktop values on every viewport. Figma's Mobile mode shrinks text-md to 12px and text-xs to 8px, which is too small to read; see Deviations. Display sizes md and larger use -2% letter spacing, as in Figma.
Weights
| Token | Value | Utility |
|---|---|---|
Token:--font-weight-bold | Value:Bold | Utility:font-bold |
Token:--font-weight-semibold | Value:Semibold | Utility:font-semibold |
Token:--font-weight-medium | Value:Medium | Utility:font-medium |
Token:--font-weight-regular | Value:Regular | Utility:font-regular (font-normal) |
Figma also lists italic styles. IBM Plex Sans Arabic has no italic, so those tokens are not emitted.
Usage
<h1 className="text-display-lg font-bold text-display">…</h1>
<p className="text-md text-primary-paragraph">…</p>
<span className="text-sm text-secondary-paragraph">…</span>Each text-* size sets its line height too. For Arabic text, raise it as described under Arabic text, and never use leading-none.
Responsive modes
The type tokens change at these widths (mobile-first):
| Mode | Applies from |
|---|---|
| Mobile | 0px |
| Tablet | 768px (md) |
| Desktop | 1024px (lg) |
Arabic text
Arabic needs four settings that Latin text does not. The docs site applies all four on every Arabic page; copy them into your own project.
:lang(ar) { line-height: 1.8; }
:lang(ar) :where(h1, h2, h3, h4) { line-height: 1.5; }
:lang(ar), :lang(ar) * { letter-spacing: 0; }- Font. IBM Plex Sans Arabic for Arabic and Latin, so a line that mixes both keeps one voice.
- Line height. 1.8 for body text and 1.35 to 1.5 for headings. The marks above and below Arabic letters need more room than the token line heights (1.4 to 1.6) give, which is why
leading-noneis never used on Arabic text. - No letter spacing. Negative tracking, including the -2% on display sizes, breaks the joins between letters. Set it to 0 in Arabic, and for any
tracking-*utility. - Numerals. Western digits (0 to 9) in prose and in every technical value (versions, ratios, sizes, counts, dates). Arabic-Indic digits (٠ to ٩) only in sample content that imitates a citizen-facing service, such as the national address card on the home page. Never mix the two systems inside one view. This is a Platform Code convention, not a DGA rule.