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.
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> value */ font-smooth: 2em;
WebKit implements a similar property, but with different values: -webkit-font-smoothing
. It only works on Mac OS X/macOS.
none
- Turn font smoothing off; display 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 a similar property, but with different values: -moz-osx-font-smoothing
. It only works on Mac OS X/macOS.
Specifications
Though present in early (2002) drafts of CSS3 Fonts, font-smooth
was removed and this specification is not on the standards track.
Browser compatibility
Feature | Firefox (Gecko) | Chrome | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 25.0[2] | 5.0[1] | No support | No support | 4.0[1] |
Feature | iOS Safari | Opera Mini | Opera Mobile | Android Browser |
---|---|---|---|---|
Basic support | ?[1] | No support | No support | No support |
[1] A similar property is implemented in WebKit called -webkit-font-smoothing
. It only works on Mac OS X/macOS.
[2] A similar property is implemented in Firefox called -moz-osx-font-smoothing
. It only works on Mac OS X/macOS.