I recently upgraded my MAC from Mojave to Catalina, then also to macOS Big Sur, all went well but I noticed that my text editor fonts were looking thinner than normal. I recall this happening with the Mojave update, so I sort of knew where to begin looking, but I couldn’t find exactly what I needed in one spot so I’m going to post it here. I am by no means an expert on these commands, I’m just posting what worked for me.
Many people had to play with these settings because not every external display is the same, so what I’ve posted here might not fit your setup exactly. It took some trial and error, but hopefully these commands will help you. As you’ll see below, everything can be reverted (see the bottom of the page) and the commands won’t do any serious damage to your MAC.
command
+ shift
+ Q
.You’ll want to check to see if you have your font smoothing enabled or disabled in your Settings
> General
tab as seen in the image. This also plays a role… I left mine on.
Even though you checked the checkbox in settings, We’re going to assure that font smoothing is on system-wide by running the command below in your favorite terminal application /Applications/Utilities/Terminal.app
. The -g
stands for global
. Further down in the tutorial I show you how to change the fonts on a per-app basis (examples shown down the page for text editors).
defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE
And then I ran the code below to add strong font smoothing:
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2
Log out, and log back in.
If you’re at this section you’re probably not happy with the results above 😞. What you’ll most likely need to do is try different combinations. I recommend that you write down what worked and where it worked. e.g. if what we ran above helped with OS X’s fonts but messed up some apps then take note of that so you can apply commands to those specific apps (basically debug). Im not exaggerating when I say that I spent nearly 8 hours doing this (also searching for answers which is why I’m writing this post).
Nevertheless, here’s the same command as above but I’ve laid them out so that you can copy and paste which one you want to try. Once you get your OSX system fonts to where you like them (ie. the menubar at the top, Finder and stock/default OSX apps), you can scroll down to the next section to update apps individually.
1
- Light font smoothing
defaults -currentHost write -globalDomain AppleFontSmoothing -int 1
2
- Medium font smoothing
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2
3
- Strong font smoothing
defaults -currentHost write -globalDomain AppleFontSmoothing -int 3
I had issues with my text editor fonts so I’ll use those as examples, but you can locate and adjust any app you’d like using the same method below.
defaults write
..plist
filename that you want to locate and update.CGFontRenderingFontSmoothingDisabled
.0
- 3
.1defaults write 2com.microsoft.VSCode 3CGFontRenderingFontSmoothingDisabled 40
(More examples further down the page)
To upgrade your apps individually you can locate their preference files by going to Finder
and selecting Go
or by pressing shift
+ command
+ G
and searching ~/Library/Preferences
. Then scroll through to locate the apps’ filename so we can adjust the font smoothing level. As you can see in the images above I’ve outlined the VSCode files that I update below.
0
.
defaults write com.microsoft.VSCode CGFontRenderingFontSmoothingDisabled 0
defaults write com.microsoft.VSCode.helper CGFontRenderingFontSmoothingDisabled 0
defaults write com.microsoft.VSCode.helper.EH CGFontRenderingFontSmoothingDisabled 0
defaults write com.microsoft.VSCode.helper.NP CGFontRenderingFontSmoothingDisabled 0
You’ll notice the d9f3b04
in my Webstorm file name. That is probably going to be different for you depending on your Webstorm download. You’ll have to check for yourself.
defaults write jetbrains.webstorm.d9f3b04 CGFontRenderingFontSmoothingDisabled 0
Here’s a final example of how I updated Sublime Text 3. If you look at the image above you’ll notice that the string gets added to the file AFTER I run the command; You can see that 0
is set to <string>0</string>
in the .plist
file. I find that turning off font smoothing for Sublime gives me the thickest fonts:
defaults write com.sublimetext.3 CGFontRenderingFontSmoothingDisabled 0
No need to worry if you messed things up, you can set everything back to it’s default OSX Catalina and macOS Big Sur state:
Removes custom font smoothing:
defaults -currentHost delete -globalDomain AppleFontSmoothing
Reverts back to light font smoothing:
defaults write -g CGFontRenderingFontSmoothingDisabled -bool True
Hopefully this helped you or you were able to learn something about OSX package/file management…
I really hope Apple addresses this, but until they do, I’ll try to keep this post updated. If you have any info regarding this or you see something off, please let me know.
Happy coding 🤓