Variable fonts ↩
- Variable fonts
- Variable fonts vs. interpolation tools
- Examples of variable fonts
- How to create and test variable fonts
Variable fonts are a special kind of OpenType font which can change their shape dynamically by parametrically ‘morphing’ between two or more sources contained in the font.
OpenType variable font technology is built on top of the TrueType GX model, expanding it to add support for cubic outlines (CFF2 table) and fully integrating it into other aspects of the OpenType format. The core technology was developed jointly by Microsoft, Google, Apple and Adobe, and released in September 2016.
How variable fonts work
Variable fonts have a default or neutral source, and all the other sources are described as movements or deltas in relation to the neutral. Deltas from all sources add up to produce a glyph shape at a given location in the designspace.
This model, based on TrueType GX, is fundamentally different from the Multiple Master model, where individual sources are placed at the corners of the designspace, without a center or neutral.
UFO-based workflows to create variable fonts still use separate sources though. The calculation of deltas is handled by fontTools.varLib on font generation.
Support for variable fonts
Variable fonts are supported by all major browsers. Variable font parameters can be controlled using the
font-variation-settings CSS4 property.
TrueType-flavored variable fonts are supported natively in macOS, and can be used programatically in DrawBot.
Variable fonts vs. interpolation tools
While OpenType variable fonts are a fairly recent technology, interpolation is a well-known and widely used method for creating design variations .
The idea of a typeface as a continuous variation space goes back further into pre-digital days.
Below are some of the interpolation tools and technologies that have been available to type designers since before the advent of variable fonts.
Multiple Master was font format introduced by Adobe in the 1990s, and supported in several Adobe apps such as Illustrator, Photoshop and the Adobe Type Manager (ATM).
The interpolation model used by the Multiple Master format has some differences and limitations in relation to the TrueType GX model. For example, it requires sources to be placed at the extremes of the variation axes, without a neutral design; it also uses cubic bezier curves instead of quadratic.
Support for Multiple Master fonts was discontinued in XXXX, but the technology survived as an interpolation engine inside font editors (FontLab, Glyphs?).
RoboFab interpolation & GlyphMath
Basic interpolation with Python was implemented in RoboFab (later FontParts), and is available in RoboFont since day one. There are many example scripts available, and several extensions which use interpolation to preview and create instances.
GlyphMath is a feature of the RoboFab/FontParts API which makes it possible to perform the four basic math operations – addition, subtraction, multiplication, division – on glyph objects. This can be used to calculate deltas and create complex interpolation systems.
Superpolator & MutatorMath
Superpolator is a standalone application which (re)opened the door to superimposed interpolation, making it possible to create complex interpolation systems with an arbitrary amount of sources. Its underlying engine, MutatorMath, was released under an open-source license in 2014 with support from Adobe. Both Superpolator and MutatorMath can be used to create interpolation design spaces.
Skateboard is the next generation of Superpolator. Instead of a separate standalone app, it is tighly integrated into RoboFont as an extension. It is also designed from the ground up to support variable fonts.
Skateboard supports two different interpolation engines:
varLib. There are some differences between them:
mutatorMathengine is a design tool which works with UFO sources. It is not very strict about the compatibility between sources: it requires only that contour order, contour direction and number of on-curve points match. It also supports extrapolation, which is a very useful feature for exploring variations during the design stage.
fontTools.varLibengine is a production tool to compile binary sources into a variable font. It is much stricter in relation to the data it is fed – all sources must have the same glyphs, kerning pairs, groups, off-curve points, etc. And it does not support extrapolation, only interpolation.
The Batch extension can solve most of these issues by inserting repair mutators.
Examples of variable fonts
Have a look at some examples of variable fonts to get an idea of what’s possible to do with the format.
How to create and test variable fonts
The RoboFont documentation contains several articles and tutorials related to variable fonts: