Variable Font Axes
What you'll learn: You'll discover how variable fonts use axes to control their appearance, giving you fine-grained control over typography with a single font file.
What Are Font Axes?
In traditional web fonts, you'd load separate files for regular, bold, italic, condensed, etc. Variable fonts change this by using axes—adjustable sliders that let you smoothly vary the font's appearance. Think of axes like the controls on a graphic equalizer: each slider adjusts a different aspect of the sound (or in this case, the font).
Standard Axes
Variable fonts define five registered axes that follow industry conventions:
- Weight (
wght): Controls boldness, from thin to ultra-black - Width (
wdth): Adjusts horizontal compression or expansion (condensed to extended) - Slant (
slnt): Controls the oblique angle (measured in degrees) - Italic (
ital): Toggles between roman and true italic letterforms (0 or 1) - Optical Size (
opsz): Optimizes legibility at different sizes (like 12pt vs 72pt)
These axes use lowercase four-letter tags and map to existing CSS properties like font-weight and font-stretch, making them easy to use.
Custom Axes
Font designers can also create custom axes for unique effects—perhaps adjusting serif length, roundness, or expressiveness. Custom axes use uppercase tags (like GRAD for grade or CASL for casual). You'll control these through CSS once you've learned more advanced variable font techniques.
Why This Matters
Instead of loading five separate font files, you load one variable font and adjust its axes. This reduces HTTP requests and gives you infinite intermediate values—not just "regular" and "bold," but any weight between 100 and 900.
Key Takeaway: Variable font axes are adjustable parameters (weight, width, slant, optical size, and custom options) that let you control a font's appearance along multiple dimensions from a single file.