Font Rendering on macOS

2020-07-02

I recently came across an informative blog post explaining font rendering on macOS and Windows that makes the case for upgrading to High-DPI monitors: https://tonsky.me/blog/monitors/. That blog post spawned an active discussion on Hacker News.

The post illustrates the effects of "font smoothing" on macOS (accessible via System Preferences -> General -> "Use font smoothing when available"), which makes the fonts thicker. The technical term is "glyph dilation". As demonstrated, bold fonts have to be carefully designed and emboldening normal fonts in software can lead to blurry results. This font smoothing feature is not to be confused with subpixel antialiasing that was eliminated in macOS Mojave: "Apple removed subpixel antialiasing from macOS in 2018, the same month it retired its last non-retina notebook." Apple's describes the font smoothing setting as follows: "Font smoothing reduces jagged edges for some fonts. When text smoothing (or "anti-aliasing") is on, smaller fonts may be harder to read."

While turning off font smoothing eliminates the aforementioned issues of in-software font thickening, on non-Retina displays, fonts typically look thin and fuzzy when font smoothing is disabled. By default, macOS Catalina enables font smoothing, which may result in a better experience on screens with a low pixel density. However, font rendering on Catalina tends to be perceived worse than on High Sierra (which supports subpixel antialiasing) regardless of the pixel density per threads in the Apple forum and on MacRumors.

To revert to Catalina's default font rendering settings, run the following commands and reboot your machine:

defaults -currentHost delete -globalDomain AppleFontSmoothing
defaults write -g CGFontRenderingFontSmoothingDisabled -bool YES

Surprisingly, the second command doesn't disable font smoothing, but leaves it enabled instead.

Also, the following commands may improve font rendering after a reboot:

defaults write -g CGFontRenderingFontSmoothingDisabled -bool YES
defaults -currentHost write -globalDomain AppleFontSmoothing -int 3

Besides the font smoothing settings, another important setting for font rendering pointed out in Niki Tonsky's blog post is the display scaling factor, which is ideally an integer. In this context, the post mentions that in contrast to Windows, macOS doesn't offer 300% scaling that is desirable for an 8K display such as the Dell UP3218K. Per a blog post by Michael Stapelberg, Linux with Xorg and certain graphic cards can drive this monitor in 300% scaling mode as well with some effort. The general state of HiDPI support on Linux-based systems was discussed on this blog in late 2014. Check out the Arch Linux Wiki for a more recent overview and configuration options.

Finally, while https://tonsky.me/blog/monitors/ argues that high-DPI monitors are a must for quality font rendering, others dislike 4K monitors or consider them a waste. Reasons typically put forward in favor of lower DPI displays are their cost and ubiquitous hardware as well as operating system support. The lack of 300% scaling on macOS reinforces the latter point. Fortunately, there are options and tweaks available to promote individual preferences on the path to crisp fonts.