Font Rendering on macOS
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.
Permanent Link for Post
- Video Disk Recorder (VDR) Tooling (2020-05-30)
- Spotify Web Player Failure due to Crash of Connected Device (2020-05-08)
- Malicious Forward Proxies (2020-04-27)
- Switching to a Dark Theme (2020-04-25)
- USB 3.0 to Gigabit Ethernet Adapter with Realtek 8153 Chipset on macOS Catalina (2020-04-23)
- Backing up Emails using OfflineIMAP (2020-04-19)
- Using a Raspberry Pi as a Wireless Access Point (2020-04-18)
- Accessing External Hard Drives in a Virtual Machine (2017-12-11)
- Managing Clipboards (2016-11-23)
- Multi-Screen Configuration Using Xrandr (2016-07-02)
- Email Backup and Migration using Thunderbird (2016-06-29)
- Automatic SSH Proxy Selection (2016-02-08)
- Set Color Temperature (2015-11-25)
- Completion Methods in Vim (2015-10-10)
- Fuzzing the mbed TLS Library (2015-09-26)
- SSH Weak Diffie-Hellman Group Identification Tool (2015-08-12)
- Building a Standing Desk for 50 Bucks (2015-01-25)
- High-DPI Displays under Linux (2014-12-23)
- Slow Wi-Fi on the Raspberry Pi (2014-06-15)
- XBMC on the Raspberry Pi (2014-06-14)
- Turning the Raspberry Pi into a Game Console (2014-06-12)
- ZFS Backups to External Hard Drives (2014-03-23)
- Display the I/O Usage of a Process (2014-02-21)
- Determining Wireless Network Channel Usage (2014-02-09)
- Managing Web Files through a Repository (2013-08-17)
- Simple HTTP File Servers (2013-08-16)
- Protect your SSH Private Keys (2013-06-16)
- Forward Secrecy for HTTPS and Ephemeral Diffie-Hellman (2013-06-14)
- Markdown Preview Chrome Extension (2013-06-13)