CSS font-optical-sizing Property
Description
The font-optical-sizing property controls whether a font’s built-in optical-size adjustments are used when rendering text. Many modern typefaces - particularly variable fonts - include alternate letterforms tuned for different point-size ranges (historically called "text" vs "display" cuts). When optical sizing is enabled the renderer may choose glyph shapes with different stroke weights, contrast, serif details and internal spacing that are optimized for the current scale, improving perceived sharpness and readability at small sizes and preserving intended contrast and detail at large sizes.
Because optical sizing can alter glyph outlines and even some glyph metrics, turning it on can produce visible changes beyond mere visual appearance: spacing between letters, apparent weight, and sometimes advance widths can shift. Those changes can affect line breaks, wrapping, and overall layout, so enabling optical sizing in a fluid or tightly constrained layout may cause reflow where the same text previously fit differently. Conversely, disabling optical sizing gives more consistent metrics across sizes, which can be useful for UI components, icon labels, or situations where predictable layout and pixel alignment are more important than typographic nuance.
The property is most relevant when used alongside variable font axes and other font controls - for example it complements font-variation-settings (which lets you tune variable-axis values) and interacts directly with the computed font-size because many fonts determine the appropriate optical cut based on the rendered size. It also depends on the chosen face via font-family (only fonts that offer optical-sizing data will respond) and should be considered together with features controlled by font-feature-settings when selecting typographic behavior.
In practical use, enable optical sizing when you want a typeface to behave more like a professionally tuned type system - small text becomes more readable and large display text retains intended contrast - and disable it when strict metric consistency or exact shape fidelity is required (logos, design systems with strict grids, or icon fonts). For accessibility and legibility, optical sizing can be a subtle yet effective tool: it often improves legibility at small sizes or low resolutions, but you should test across your critical fonts and the contexts where text reflow would be sensitive. Finally, because a change can trigger layout updates, consider performance and rendering implications on dynamic text content or during animations.
Definition
- Initial value
- auto
- Applies to
- all elements. It also applies to ::first-letter and ::first-line.
- Inherited
- yes
- Computed value
- as specified
- Animatable
- yes
- JavaScript syntax
- object.style.fontOpticalSizing
Interactive Demo
Chapter 3
On this particular Thursday, something was moving quietly through the ionosphere many miles above the surface of the planet; several somethings in fact, several dozen huge yellow chunky slablike somethings, huge as office blocks, silent as birds.
Syntax
font-optical-sizing: none | auto
Values
- noneThe browser will not modify the shape of glyphs for optimal viewing.
- autoThe browser will modify the shape of glyphs for optimal viewing.
Example
Browser Support
The following information will show you the current browser support for the CSS font-optical-sizing property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 2nd January 2026
