Fix MacOS Catalina or macOS Big Sur Fonts After Upgrade

Fix MacOS Catalina or macOS Big Sur Fonts After Upgrade

tech
Colin Stodd
OSX,Catalina,macOS Big Sur,macOS 11,MAC,Apple,Fonts,Tips
24 Oct 2019 (Published)
02 Mar 2021 (Updated)

UPDATE

For those of you that are unfamiliar with the Terminal/command line, I'm happy to let you know that I came across a post on Medium that introduced me to a OSX app which allows you to do most of theses commands below from a free application called TinkerTool. As you can see in the image below there is a tab called "Font Smoothing", and you'll see that there are options for you to do much of what I explain below. However, this app is limited and does not let you adjust font smoothing on a per-app basis (that I explain below). But if all you need is to set the smoothing globally, than this might be a better method.


  Start of original post

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.

   Note: Every time you run one of these commands, you'll have to log out to see the changes. You can do so by pressing command + shift + Q.

What Worked For Me:

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.


Adjusting Fonts Globally:

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

 


Adjusting Fonts Individually (Text Editors and Apps):

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.

  Here's a color-coded script in gold to help you visualize the values to update.
  1. Keep as defaults write.
  2. Application .plist filename that you want to locate and update.
  3. Keep as CGFontRenderingFontSmoothingDisabled.
  4. Select level of font smoothing 0 - 3.
1defaults write 2com.microsoft.VSCode 3CGFontRenderingFontSmoothingDisabled 40
(More examples further down the page)

VSCode:

Finder 'Go to folder:'
VSCode preferences location on OSX

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.

   FWIW: VSCode is built with Electron JS and I've found that Electron apps don't need much font smoothing so I typically set them to 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

Webstorm:

Webstorm filename id image

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

Sublime Text 3.2 (example):

Sublime Text 3 plist file name image
Sublime Text 3 plist file details in Library/preferences image

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

 


Revert back to OSX default:

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 🤓