…and make it look like High Sierra’s.
With macOS Mojave, Apple disabled a feature called “Subpixel antialiasing”. Apparently, it is some complex, legacy code, and they decided to remove it.
On Hacker News, ridiculous_fish, an ex-macOS software engineer, says subpixel antialiasing is painful to implement:
ex-MacOS SWE here. Subpixel antialiasing is obnoxious to implement. It requires threading physical pixel geometry up through multiple graphics layers, geometry which is screen-dependent (think multi-monitor). It multiplies your glyph caches: glyph * subpixel offset. It requires knowing your foreground and background colors at render time, which is an unnatural requirement when you want to do GPU-accelerated compositing. There’s tons of ways to fall off of the subpixel antialiased quality path, and there’s weird graphical artifacts when switching from static to animated text, or the other way. What a pain!
Nevertheless there’s no denying that subpixel-AA text looks better on 1x displays. Everyone notices when it’s not working, and macOS will look worse without it (on 1x displays).
Indeed, with macOS Mojave, a lot of users noticed their font looked awful. I noticed it too, on my 1080p monitor (“1x display”): the fonts looked blurry.
On my retina Macbook Pro, the font looked thinner and, I don’t know, just bad, especially on Electron/Webkit based apps. What was really bothering me was how bad the fonts looked in Visual Studio Code, my favorite editor.
In fact, an issue on the VS Code GitHub repo was opened since the Mojave beta, and people were complaining, without any real solution.
On some websites, you will find command lines that modify the font smoothness. However this isn’t a real fix and barely improve the font rendering.
The real solution
While I was desperate and preparing to rollback to High Sierra, GitHub user alexanderyakusik posted the solution in the issue I mentioned above:
I just found the possible solution. Try executing this command in the terminal:
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
As said above:
- Open the terminal
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NOand press enter
Note: Some users reported that logging out was sufficient to apply the change.
I had to reenable font smoothing in the settings though. It should probably be on for you, but if it’s not, enable it here:
Now, it feels like High Sierra. I’m so happy! 🎉
What does this command do? I don’t know for sure. But I can deduce it is something that disable something linked to font smoothing, and it’s set to
YES by default.
That means that Apple did not remove the code for subpixel antialiasing, but disabled it by default. I wonder if they will rollback this change in future releases, since I did not see a single person on the internet that was happy about this change…
I hope they won’t remove the option at least. Well, we’ll see!