Typography

The Mako typeface, the three font variables components read, and the type scale — including the 2px bump.

Mako ships one typeface — the Mako variable font, weights 200–900, with a matching italic. Headings, body text and code all use it; there is no second family to load.

Components never name a font family. They read three CSS custom properties, and whatever you expose under those names is what renders.

The variable contract

All three default to --mako-font-family-default (Mako plus a full system fallback stack), so components render in Mako as soon as a "Mako" face is loaded.

Loading the font

In Next.js, import the three next/font/local exports and put all three variable classes on the same element, with font-sans alongside:

app/layout.tsx

Outside Next.js, @import "mako-ui/fonts.css" declares the same @font-face rules and sets the same three variables on :root. mako-ui/fonts pulls in next/font/local and will not resolve elsewhere — that is why next is an optional peer dependency.

The type scale

Mako runs a larger effective scale than stock Tailwind. Every --text-* step adds --mako-text-bump, so text-sm renders at 16px rather than 14px:

text-xs12 + 2 = 14pxMako
text-sm14 + 2 = 16pxMako
text-base16 + 2 = 18pxMako
text-lg18 + 2 = 20pxMako
text-xl20 + 2 = 22pxMako
text-2xl24 + 2 = 26pxMako
text-3xl30 + 2 = 32pxMako
text-4xl36 + 2 = 38pxMako
text-5xl48 + 2 = 50pxMako
text-6xl60 + 2 = 62pxMako
text-7xl72 + 2 = 74pxMako
text-8xl96 + 2 = 98pxMako
text-9xl128 + 2 = 130pxMako

Weights

The variable font covers 200–900 in one file. Mako's own components only ever use font-medium and font-semibold.

Metric overrides

Each font export carries three metric overrides:

Mako's native vertical metrics are asymmetric, which pushes text off-centre inside flex-centred boxes — buttons, badges, inputs, menu items. These overrides rebalance the line box globally. 88% + 27% = 115% matches the font's original total, so line heights and layout are unchanged.

Dropping them, or rounding them to friendlier numbers, re-breaks optical centring across every control. If you ship your own @font-face for Mako, carry all three over.

Brand typography tokens

globals.css also exposes the raw Rubix scale. These are plain custom properties — they generate no Tailwind utilities, and no Mako component uses them. Prefer text-*, font-* and leading-*; reach for these only when a design calls for a value the semantic scale does not cover.

Line heights

Font sizes

Using a different typeface

Supported — expose it under the same three names:

app/layout.tsx

Expect to re-check vertical centring: the metric overrides above are tuned for Mako, and another face has its own metrics.

A common trap: Next.js starters define --font-geist-sans and --font-geist-mono, which Mako never reads. The components stay on the Mako stack and the intended font never appears — rename the variables or remap them.