π What is font-smoothing?
font-smoothing refers to a set of non-standard CSS properties that affect how text is anti-aliased (smoothed) on screens. These properties influence how crisp, thin, or heavy fonts appear β especially on macOS and iOS devices.
Note
β οΈ Support varies across browsers.
β Works mainly in WebKit-based browsers (Chrome, Safari, Edge on macOS).
π― Why Use font-smoothing?
- Make text appear thinner or sharper
- Improve legibility on retina displays
- Match brand typography styles
- Reduce bold appearance of text on macOS
- Fine-tune UI typography for better aesthetics
π The Available Properties
| Property | Browser | Description |
|---|---|---|
| -webkit-font-smoothing | Safari, Chrome (macOS) | Controls anti-aliasing (subpixel vs grayscale) |
| -moz-osx-font-smoothing | Firefox (macOS) | Controls smoothing on macOS Firefox |
Note
π Values Explained
-webkit-font-smoothing
| Value | Effect |
|---|---|
| auto | Default behavior |
| antialiased | Uses grayscale smoothing β text appears thinner + crisper |
| subpixel-antialiased | Uses subpixel smoothing β heavier and more readable |
-moz-osx-font-smoothing
| Value | Effect |
|---|---|
| auto | System default |
| grayscale | Thinner, more refined text on macOS Firefox |
π§ͺ Example β Making Text Look Thinner (Common UI Style)
Thinner Typography
.thin-text {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}This is widely used in modern clean UI designs.
π§ͺ Example β Making Text Look Heavier
Heavier Text
.heavy-text {
-webkit-font-smoothing: subpixel-antialiased;
}Improves readability on low pixel density screens.
π¨ Example β Applying to Entire Website
Global Style
html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}Often used in modern design systems like Apple, Stripe, GitHub.
π§ How Font Smoothing Works Internally
- Subpixel anti-aliasing uses RGB subpixels β sharper & darker text
- Grayscale anti-aliasing ignores subpixels β lighter, cleaner look
- macOS emphasizes beauty, Windows emphasizes readability
This is why text appears different on macOS vs Windows.
π± Does font-smoothing Work on Windows?
β No β Windows uses ClearType and ignores these properties.
β You can still use font-weight, font-feature-settings, and font-variation-settings to control appearance.
β οΈ Common Mistakes
- β Expecting it to work on Windows β it wonβt
- β Using without testing on macOS (may look weird on retina displays)
- β Applying antialiased to text that needs readability over aesthetics
- β Trying to fix poor-quality fonts β smoothing canβt fix bad type design
Note
π₯ Summary
font-smoothing provides control over how text is rendered on macOS browsers. It can make fonts appear thinner, cleaner, or stronger depending on the needs of your UI. While non-standard, it is widely used in polished design systems.
Learn more βMDN Docs π
(Note: MDN lists this as non-standard.)