Ahmad Awais



Fix macOS Mojave Font Rendering Issue

Ahmad AwaisAhmad Awais

Just updated to macOS Mojave only to find out that there is a terrible font rendering issue for almost all the ElectronJS based apps like VSCode my code editor of choice.

After researching a little bit, messing around with system defaults, less to my surprise, I found out that Apple has disabled Subpixel antialiasing for text in macOS Mojave. It’s gone.

Little more research led to a fix, all you have to do is open up your Terminal application (COMMAND (⌘) + SPACE then search for Terminal) and run the following command.

πŸ”₯ I’ve just launched a course called VSCode Power User β†’
This is easily my best work ever. Check out why I worked ridiculously hard for 1.5 years and a 1,000+ hours building, recording, sharing 200+ dev tips in this VSCode.pro course!

defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE

5 Macos Mojave Font Rendering Issue Fix

⚠️ Using FALSE/NO is the same since it’s a boolean data type.
πŸ‘¨β€πŸ’» I’m teaching thousands of devs how to become VSCode Power Users β†’
βœ… This site is super fast?! It’s hosted with Kinsta on Google servers β†’

This will lead to the font smoothing to be enabled β€” especially for non-retina external monitors. You’ll thank me later. You need to sign out and sign back in or restart your Mac before you can see your changes after running this command. That’s pretty much all.


Explanation: What’s Happening In there?!#

Some folks in the comments asked about how I stumbled upon this fix, so for the sake of technical know-how, I am updating this post with more details.

🎯 Apple’s macOS normally has a set of defaults that you can change programmatically. I have such an opinionated workflow for whenever I install my OS from scratch. That’s a story for another day.

πŸ€– I remember in the past, with High Sierra, I had to enable subpixel font rendering on non-Apple LCDs. That was the AppleFontSmoothing option which I set to true, or one could directly add -int 1 for that option.

πŸ€” I was unable to find that setting in macOS Mojave defaults. I kept looking in there. Especially in the Apple Global Domain settings, since that’s where the old setting was.

πŸ™ƒ Aha! I found a new setting in there, it’s called CGFontRenderingFontSmoothingDisabled β€” it’s quite evident what this setting does. Disables the rendering of smooth fonts. It was set to 1 which means it was set to TRUE or YES.

Macos Mojave Cgfontrenderingfontsmoothingdisabled 1

So, all I had to do to try my luck was to disable this font smoothing disabler, i.e. enable to font smoothing on non-Apple/non-retina LEDs. For that I wrote this following command:

defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE

I ran this command, checked if it worked, by logging out and in, and boy it did. Super happy. I wish Apple fixes this instead of disabling this option altogether in the near future updates.

Macos Font Fix Cgfontrenderingfontsmoothingdisabled

πŸŽ‰ Since I am a big fan of VSCode I did a before/after --diff of the defaults and it seems the setting is now set to 0 and it works so hurrah!

Macos Mojave Defaults Changed Font Fixed

⚠️ Some folks also recommended enabling the font smoothing option in the General font settings but that didn’t work for me. It was already enabled and did nothing to improve the situation.

Font Blur Issue Macos Mojave

Peace! ✌️

πŸ‘¨β€πŸ’» I’m teaching thousands of devs how to become VSCode Power Users β†’
βœ… This site is super fast?! It’s hosted with Kinsta on Google servers β†’

I help businesses understand developers πŸ“Ÿ Launching Node.js CLI Automation Course πŸ‘¨β€πŸ« Edutainer at VSCode.pro 🎩 An award-winning open-source engineer and developer advocate 🦊 Google Developers Expert for web 🌳 Node.js foundation Community Committee member ✌️ Author of various open-source dev-tools and software libraries used by millions of developers worldwide ⓦ WordPress Core Developer πŸ“£ TEDx Speaker πŸ™Œ Leading developers and publishing technical content for over a decade πŸ˜‚ Self-confessed tech comedian working with the JavaScript web and cloud communities πŸ’œ Loves his wife (Maedah) ❯ Learn more about Awais ↣

Say πŸ‘‹ on Twitter @MrAhmadAwais | Subscribe to the Developers Takeaway!


Developers Takeaway

Takeaway my professional opinion on open-source, developer relations, growing your business with family, and everything in between! Delivered to your inbox a couple of times every year. I'm even funny at times. I hate spam β€” pinky-promise!

πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’» 115,834 Developers Already Subscribed