Module typography

Source
Expand description

§Typography Tokens

This module provides type-safe typography tokens for font families and size scales used throughout the Fern design system.

§Font Categories

Fern uses three font categories:

CategoryPurposeDefault
PrimaryUI text, labelsInter
MonospaceCode, terminal iconsJetBrainsMono Nerd Font
IconMaterial iconsMaterial Symbols Rounded

§Font Size Scale

Font sizes follow a semantic scale rather than arbitrary pixel values:

TokenPixelsUse Case
Xs10pxCaptions, legal text
Sm12pxLabels, secondary text
Md14pxBody text (default)
Lg16pxSubheadings
Xl20pxHeadings
Xxl24pxLarge headings

Structs§

FontFamily
A font family specification.
FontSizeScale
Complete font size scale with pixel values.
Typography
Typography configuration combining fonts and sizes.

Enums§

FontSize
Font size scale with semantic sizes.

Functions§

default_lg 🔒
default_md 🔒
default_sm 🔒
default_xl 🔒
default_xs 🔒
default_xxl 🔒