Skip to main content

Control optical sizing for variable fonts that automatically adjust letterforms based on display size. Optical sizing optimizes stroke weight, spacing, and x-height for maximum readability at any size.

Presets

Target Element

Font Optical Sizing

Browser adjusts optical sizing based on font-size

Font Family

Has Optical SizingAxis range: 8-60

Font Size: 24px

Heading

Font Weight: 400

LightRegularBoldBlack

Preview Options

Preview Text

Configuration

Live Preview

Typography matters in design.
Font: Source Serif 4Size: 24pxWeight: 400Optical Sizing: auto

Auto vs None Comparison

font-optical-sizing: auto

Typography matters in design.

Letterforms optimized for the display size

font-optical-sizing: none

Typography matters in design.

Uses default optical size (usually optimized for ~12pt)

Optical Sizing Across Size Range

See how optical sizing adapts letterforms at different display sizes

10px - Caption
Hamburgefonstiv
12px - Footnote
Hamburgefonstiv
14px - UI Text
Hamburgefonstiv
16px - Body
Hamburgefonstiv
18px - Large Body
Hamburgefonstiv
24px - H4
Hamburgefonstiv
32px - H3
Hamburgefonstiv
48px - H2
Hamburgefonstiv
64px - H1
Hamburgefonstiv
96px - Display
Hamburgefonstiv

Generated CSS

body {
  font-optical-sizing: auto;
  font-size: 24px;
}

Full Example with Font Family

/* Font Optical Sizing */
body {
  font-family: "Source Serif 4", serif;
  font-optical-sizing: auto;
  font-size: 24px;
  font-weight: 400;
  /* Variable font with optical sizing axis (opsz) */
  /* Axis range: 8-60 */
}

Code Examples

Basic Optical Sizing

/* Enable optical sizing (default) */
body {
  font-family: "Source Serif 4", serif;
  font-optical-sizing: auto;
}

/* Disable optical sizing */
.legacy-style {
  font-optical-sizing: none;
}

Typography Scale with Optical Sizing

/* All elements use optical sizing */
:root {
  font-optical-sizing: auto;
}

/* Display headline - refined for large size */
.display {
  font-family: "Source Serif 4", serif;
  font-size: 72px;
  font-weight: 300;
  /* opsz automatically adjusts to ~72 */
}

/* Body text - optimized for reading */
.body-text {
  font-family: "Source Serif 4", serif;
  font-size: 16px;
  font-weight: 400;
  /* opsz automatically adjusts to ~16 */
}

/* Caption - enhanced legibility */
.caption {
  font-family: "Source Serif 4", serif;
  font-size: 12px;
  font-weight: 500;
  /* opsz automatically adjusts to ~12 */
}

Using font-variation-settings for Manual Control

/* Manual optical size control */
.manual-opsz {
  font-family: "Source Serif 4", serif;
  font-size: 24px;
  /* Override automatic opsz */
  font-variation-settings: "opsz" 48;
}

/* Force small text appearance at large size */
.small-opsz-large-size {
  font-size: 48px;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 12;
}

/* Force display appearance at small size */
.large-opsz-small-size {
  font-size: 14px;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 72;
}

Responsive Typography

/* Optical sizing adapts automatically */
.responsive-heading {
  font-family: "Roboto Flex", sans-serif;
  font-optical-sizing: auto;
  font-size: clamp(1.5rem, 5vw, 4rem);
  /* opsz automatically adjusts as size changes */
}

/* Media query adjustments */
@media (max-width: 768px) {
  .hero-text {
    font-size: 36px;
    /* opsz auto-adjusts for new size */
  }
}

@media (min-width: 1200px) {
  .hero-text {
    font-size: 72px;
    /* opsz auto-adjusts for larger size */
  }
}

Variable Font with Multiple Axes

/* Roboto Flex with all axes */
@font-face {
  font-family: "Roboto Flex";
  src: url("RobotoFlex-Variable.woff2") format("woff2-variations");
  font-weight: 100 1000;
  font-stretch: 25% 151%;
}

.flexible-text {
  font-family: "Roboto Flex", sans-serif;
  font-optical-sizing: auto;
  font-size: 24px;

  /* Combine with other variable axes */
  font-weight: 500;
  font-stretch: 100%;

  /* opsz range: 8-144 */
  /* Automatically uses opsz: 24 */
}

/* Custom axis combination */
.custom-axes {
  font-variation-settings:
    "wght" 450,
    "wdth" 110,
    "opsz" 36,  /* Manual optical size */
    "GRAD" 0;
}

Print Stylesheet

/* Screen styles */
@media screen {
  body {
    font-optical-sizing: auto;
  }
}

/* Print - adjust for physical media */
@media print {
  body {
    font-optical-sizing: auto;
    /* Browsers typically use pt for print */
    font-size: 11pt;
    /* opsz adjusts for print size */
  }

  h1 {
    font-size: 24pt;
    /* opsz auto-adjusts for 24pt */
  }
}

Reference

font-optical-sizing Values

ValueDescriptionEffect
autoDefault. Enable optical sizingBrowser sets opsz axis based on font-size
noneDisable optical sizingUses font default (typically opsz: 12)

Variable Fonts with Optical Sizing (opsz) Axis

Fontopsz RangeTypeNotes
Source Serif 48-60SerifAdobe open source
Roboto Flex8-144Sans-serifWide range, many axes
Source Sans 38-60Sans-serifAdobe open source
Inter14-32Sans-serifUI-focused font
Newsreader6-72SerifEditorial design
Literata7-72SerifGoogle Play Books
Crimson Pro9-72SerifBook typography
Fraunces9-144SerifDisplay + text

What Optical Sizing Changes

FeatureSmall Sizes (Caption)Large Sizes (Display)
Stroke WeightHeavier, more uniformLighter, more contrast
Letter SpacingMore open, looserTighter, more refined
x-heightTaller for legibilityStandard proportions
CountersMore openStandard or tighter
DetailSimplified, robustFull detail, refined
ContrastLower contrastHigher contrast

Browser Support

BrowserVersionSupport
Chrome79+Full
Firefox62+Full
Safari11+Full
Edge79+Full

Best Practices

  • Use Variable Fonts with opsz Axis: Only variable fonts with the optical sizing (opsz) axis benefit from font-optical-sizing. Traditional static fonts ignore this property.
  • Leave auto as Default: Most of the time, font-optical-sizing: auto is the correct choice. The browser intelligently adjusts based on the computed font-size.
  • Consider Manual Control for Special Cases: Use font-variation-settings to manually set opsz when you need a specific optical appearance regardless of size.
  • Test Across Sizes: Preview your typography at various sizes to ensure optical sizing produces the desired results across your design.
  • Responsive Typography Works Well: When using clamp() or responsive font sizes, optical sizing automatically adapts as the computed size changes.
  • Fallback Gracefully: For browsers or fonts that do not support optical sizing, the text still displays normally - just without the optical adjustments.
  • Combine with Weight: Optical sizing and font weight work together. Heavier weights at small sizes can enhance the legibility benefits.
  • Print Considerations: Optical sizing works well for print stylesheets where physical point sizes matter for readability.

Common Use Cases

Editorial Design

Headlines, body text, and captions all benefit from automatic optical sizing adjustments.

Responsive Websites

As viewport-relative sizes change, optical sizing adapts letterforms automatically.

Display Typography

Large hero text gets refined details while small UI text remains legible.

Reading Applications

E-readers and book apps can optimize text appearance at user-selected sizes.

Data Visualization

Small labels in charts benefit from the legibility optimizations of small optical sizes.

Accessibility

Users who zoom can see text optimized for their chosen display size.

Rate this tool