Remove `font-smoothing: antialiased` from mdc-typography
See original GitHub issueCSS -webkit-font-smoothing:antialiased
is set by mdc-typography
class. I’m no graphics expert, but someone who sounds like one say this is a no no. Also, MDN says no no.
stop “fixing” WebKit font smoothing by disabling subpixel rendering. … for main portions of text where readability is paramount please leave the default setting alone and let the operating system handle the smoothing.
- Dmitry Fadeyev 2012
Do not use it on production sites facing the Web.
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. font-smooth - MDN
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:23 (16 by maintainers)
Top Results From Across the Web
font-smooth - CSS: Cascading Style Sheets - MDN Web Docs
The font-smooth CSS property controls the application of anti-aliasing when fonts are rendered.
Read more >Font Smoothing - Tailwind CSS
Applying font smoothing. Use the subpixel-antialiased utility to render text using subpixel antialiasing and the antialiased utility to render text using ...
Read more >Typography - Material Design
When using Sass global variables, they must be defined before the component is imported by setting a global variable named $mdc-typography-styles-{style}.
Read more >How to Adjust or Disable Font Smoothing in macOS Big Sur
This article shows you how to disable it with a simple Terminal command. font smoothing catalina. Before macOS 11 Big Sur came along,...
Read more >How to Change or Remove Font Smoothing on MacOS ...
If you're using macOS Monterey or macOS Big Sur on a regular non-retina display, you may also notice blurry text when font smoothing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Following this discussion—and after some quick tests—I found defaulting
font-smoothing
on high-density screens to produce very balanced results. Evidently this targets only large-screen desktop users where type can indeed be made more legible.So what I’m seeing here is largely theoretical evidence suggesting that
font-smoothing: antialiased
should not be applied, and largely concrete evidence that shows that fonts show up better on devices when it is applied (at least for Roboto, which is whatmdc-typography
uses as its base font). Thus, I’m closing this issue and electing to keep the property, for now.Regarding the stop “fixing” article: in a perfect world operating systems would be smart enough to determine whether or not a font should have subpixel antialiasing applied based on its heuristics, but based on visual evidence provided by @shyndman that doesn’t seem to be the case.
Regarding MDN’s warning, we use the vendor prefixes directly because of this. And furthermore, Mozilla is pretty aggressive when it says not to use things. It also says not to use KeyboardEvent.keyCode 😉 which - at least until all browsers support
KeyboardEvent.key
- is untenable.I’m essentially coming at this from the same place as David Walsh:
To me, until I see some evidence that these font-smoothing applications make our components / typographic system look worse, I don’t see the value in removing it.
On a final note, if you use your own fonts and font-smoothing turns out to make it less legible, simply add an override via css: