🔤Variable Font
Also known as OpenType Variable Font, Variable Typeface
One font file with a slider. Set it to any weight or width.
Think of it like
It is like a dimmer switch for light. You can pick any level, not just on or off.
Example
Emma's site loads one variable file and uses weights 350, 500 and 720. Before, it needed three files.
Why it matters
It gives finer control over type. It can also cut the number of files a page loads.
Definition
Example code
css
h1 {
font-weight: 650;
font-variation-settings: "wdth" 90;
}Common mistake
Key takeaways
- 1One file, many styles. A range, not separate fonts.
- 2Axes. Weight, width, slant and more.
- 3Fewer files. Often lighter than many fonts.