Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Summary
The font-smooth
CSS property controls the application of anti-aliasing when fonts are rendered.
- Initial value:
auto
- Applies to: all elements and generated content
- Inherited: Yes
- Percentages: relative to parent element's font size
- Media:
visual
- Computed value: as specified
Syntax
/* Keyword values */ font-smooth: auto; font-smooth: never; font-smooth: always; /* <length> */ font-smooth: 2em;
Webkit implements something similar with a different name: -webkit-font-smoothing
and different values, however, just like font-smooth, this is non-standard and should not be used.
none
- turn font smoothing off, show the text with jagged sharp edges.antialiased
- smooth the font on the level of the pixel, as opposed to the subpixel. Switching from subpixel rendering to antialiasing for light text on dark backgrounds makes it look lighter.subpixel-antialiased
- on most non-retina displays this will give the sharpest text.
Firefox implements something similar with a different name: -moz-osx-font-smoothing
and different values, however, just like font-smooth, this is non-standard and should not be used.
auto
- Allow the browser to select an optimization for font smoothing, typicallygrayscale
.inherit
- Inherit from the parent element.unset
grayscale
- Render text with grayscale antialiasing, as opposed to the subpixel. Switching from subpixel rendering to antialiasing for light text on dark backgrounds makes it look lighter.
Specifications
Though present in early (2002) drafts of CSS3 Fonts, font-smooth
has been removed from this specification and is currently not on the standard track.
Browser compatibility
Feature | Firefox (Gecko) | Chrome | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 25.0 (see note) | 5.0 (see note) | No support | No support | 4.0 (see note) |
Feature | iOS Safari | Opera Mini | Opera Mobile | Android Browser |
---|---|---|---|---|
Basic support | ? (see note) | No support | No support | No support |