also called axis interpolation · variable axes
A variable font exposes continuous axes rather than fixed cuts, so weight can be animated instead of swapped. One file, the whole family, and no flash between weights. Caslon cut every size by hand as its own font, and a size was designed for its size: sturdier and clearer when small, finer when large. A variable font carries that as an axis, optical size, so as the line shrinks it turns into a text face and as it grows, into a display face. Weight is another axis. A family used to be six files, ExtraLight to Black; here they are six marks on one dial, and every weight between them is there too.
How it is built
@property --w { syntax: '<number>'; inherits: true; initial-value: 400 }
.line { font-weight: var(--w); /* the dial: any weight in one file */
font-optical-sizing: auto; /* the design follows the size */
font-size: calc(exp(var(--lb)) * var(--m) * 1px) } /* the size glides with the scroll */
dial.oninput = () => stage.style.setProperty('--dial', dial.value)In full, on GitHub index.html showcase.css showcase.js
Sheet — A Specimen by William Caslon, Letter-Founder, in Chiswell-Street, London, 1734; public domain, via Wikimedia Commons. Type — Source Serif 4, Adobe, inspired by the forms of Pierre Simon Fournier; SIL Open Font License. Facts — William Caslon; Traditional point-size names; optical size; Source Serif.
