A complete guide to variable font technology

Variable fonts: What they are, How they work and benefits

Variable fonts have transformed modern web design and typography by combining an entire font family—spanning multiple weights, widths, and styles—into a single, unified file. To simplify testing, fine-tuning, and implementing these dynamic typefaces.

What are variable fonts?

Variable fonts are font files that contain many variations (in size, weight, or height) of a typeface inside a single font file.

Traditionally, a font family might require separate files:

• Roboto-Regular.ttf

• Roboto-Medium.ttf

• Roboto-Bold.ttf

• Roboto-Italic.ttf

With a variable font, these variations can be stored in one file, and the application can adjust the font along one or more variation axes.

Imagine a variable font with a weight axis:

Weight: 100 (Thin) ───────────── 900 (Bold)

Instead of selecting only predefined weights such as 400 or 700, you could request:

1{
2    font-weight: 550;
3}

The font can generate the appropriate intermediate design within the next font properties.

AxisTagWhat it controls
WeightwghtThin → Bold
WidthwdthCondensed → Expanded
SlantslntUpright → Slanted
ItalicitalUpright → Italic
Optical sizeopszAdjusts design for different text sizes

There can also be custom axes defined by the font designer.

For example:

WeightWidthOptical sizeSlant
4009014-5

These values can be combined for particular font formating.

Why variable fonts are useful?

How variable fonts work technically?

Variable fonts are based on OpenType technology. They use tables such as:

NameWhat it does
fvarDefines variation axes
gvarGlyph variations
hvarHorizontal metrics variations
mvarMetric variations
statDescribes styles/axis values

For example, the fvar table can be defined like that:

AxisMinimumDefaultMaximum
wght100400900

The font engine then adjusts the appropriate glyph outlines and metrics to the requested value.

Variable fonts and Aspose.Font

Aspose offers a free web-based tool: the Aspose Variable Font Viewer.

This browser-based application allows designers and developers to interactively inspect, adjust, and copy CSS code for variable fonts in real time.

Key features and functionality

  1. Interactive variation axis sliders Traditional typography requires separate files for Regular, Bold, Condensed, or Light font weights. The Variable Font Viewer extracts and exposes all OpenType variation axes embedded within a file, offering real-time sliders for both standard and custom dimensions:

Variation axes suported by the Aspose Variable Font Viewer

  1. Live text and layout preview
  1. Named instances (Presets)

Most variable fonts come pre-configured with Named Instances (preset styles such as Regular, Bold Condensed, or Display Light). The Aspose viewer detects these built-in presets, enabling instant switching with a single click without manually tweaking individual sliders.

  1. Automated CSS code generation

Generated CSS code

  1. Built-in library for visualisation

How to use the Aspose Variable Font Viewer

  1. Select or upload a font: Choose one of the pre-loaded sample variable fonts or upload a local .ttf or .otf file.
  2. Inspect and adjust axes: Use the live sliders to modify weight, width, optical size, slant, or custom axes. Alternatively, select a predefined Named Instance.
  3. Customize preview text: Modify the preview text, size, and line height to evaluate readability and aesthetics.
  4. Export CSS: Click Copy CSS to copy the generated stylesheet rule and paste it directly into your web stylesheet.

Where can I get variable fonts?

You can get variable fonts from several reputable sources, depending on whether you need free/open-source fonts, web fonts, or commercial typefaces.

  1. Google Fonts - free and open source

Google Fonts collection is one of the easiest places to find variable fonts. Many families, such as Roboto, Inter, and Source Sans 3, are available with variable axes.

Google marks variable fonts and the number of variations of the font.

How Google marks variable fonts

It also lets you test those variations right on the spot.

Variations inside the Roboto Google font

  1. Adobe Fonts - large professional collection

Adobe Fonts has a dedicated selection of variable fonts. Adobe currently describes its library as containing more than 100 variable typefaces, with variable fonts allowing many styles to be generated from a single font.

  1. Font foundries and commercial marketplaces

For premium fonts, variable versions are increasingly offered directly by type foundries and font marketplaces.

  1. GitHub and open-source projects

Many open-source variable fonts are distributed through GitHub repositories. This is particularly useful if you’re a developer and need the actual .ttf, .otf, or .woff2 files rather than simply using a web-font service.

For example, Adobe’s Source Han family includes variable OpenType fonts and corresponding TrueType and WOFF2 versions for different languages.