Fixing Terrible Blurry Font Rendering Issue in macOS Mojave #OneDevMinute
Tags: mac, macos, macosmojave
Published: 2018-09-25 11:13:27

---
title: Fixing Terrible Blurry Font Rendering Issue in macOS Mojave #OneDevMinute 
published: true
description: After updating to macOS Mojave I spent my morning fighting with the terrible blurry font rendering issue in the new #macOSMojave. I found out that Apple has disabled Subpixel antialiasing for text in macOS Mojave. It's gone. So, I found a fix.
tags: mac, macos, macosmojave
canonical_url: https://ahmadawais.com/fix-macos-mojave-font-rendering-issue/
---


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 <a href="https://VSCode.pro/">VSCode</a> my code editor of choice.

After researching a little bit, 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 <code>Terminal</code> application (`COMMAND (⌘) + SPACE` then search for <code>Terminal</code>) and run the following command.

<code>defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO</code>


<a href="https://ahmadawais.com/fix-macos-mojave-font-rendering-issue/"><img class="aligncenter size-full wp-image-4888" src="https://ahmadawais.com/wp-content/uploads/2018/09/5-macos-mojave-font-rendering-issue-fix.jpg" alt="5 Macos Mojave Font Rendering Issue Fix" width="2214" height="426" /></a>

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



<h2 style="text-align: center;">🧐</h2>
<h2 style="text-align: center;">Explanation: What's Happening In there?!</h2>


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 <code>defaults</code> 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 <code>AppleFontSmoothing</code> option which I set to true, or one could directly add <code>-int 1</code> for that option.

🤔 I was unable to find that setting in macOS Mojave <code>defaults</code>. I kept looking in there. Especially in the <code>Apple Global Domain</code> settings, since that's where the old setting was.

🙃 Aha! I found a new setting in there, it's called <code>CGFontRenderingFontSmoothingDisabled</code> — it's quite evident what this setting does. Disables the rendering of smooth fonts. It was set to <code>1</code> which means it was set to <code>TRUE</code> or <code>YES</code>.

<a href="https://AhmadAwais.com/"><img class="aligncenter size-full wp-image-4905" src="https://ahmadawais.com/wp-content/uploads/2018/09/macos-mojave-CGFontRenderingFontSmoothingDisabled-1.png" alt="Macos Mojave Cgfontrenderingfontsmoothingdisabled 1" width="1701" height="283" /></a>

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:

<code>defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE</code>
<ul>
 	<li><strong>defaults</strong> — access the Mac OS X user defaults system</li>
 	<li><strong>−g</strong> | <strong>−globalDomain</strong> | <strong>NSGlobalDomain</strong> — Specifies the global domain. ’-g’ and ’-globalDomain’ may be used as synonyms for NSGlobalDomain</li>
 	<li><strong>CGFontRenderingFontSmoothingDisabled </strong>— the setting which I wanted to disable to enable the font smoothing</li>
 	<li><strong>−bool</strong> [ean] — Allows the user to specify a boolean as the value for the given preference key. The value must be <code>TRUE/YES</code> or <code>FALSE/NO</code></li>
</ul>
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.

<a href="https://AhmadAwais.com/"><img class="aligncenter size-full wp-image-4906" src="https://ahmadawais.com/wp-content/uploads/2018/09/macos-font-fix-CGFontRenderingFontSmoothingDisabled.png" alt="Macos Font Fix Cgfontrenderingfontsmoothingdisabled" width="1743" height="332" /></a>

🎉 Since I am a big fan of <a href="https://VSCode.pro/">VSCode</a> I did a before/after <code>--diff</code> of the defaults and it seems the setting is now set to <code>0</code> and it works so hurrah!

<a href="https://AhmadAwais.com/"><img class="aligncenter size-full wp-image-4907" src="https://ahmadawais.com/wp-content/uploads/2018/09/macos-mojave-defaults-changed-font-fixed.png" alt="Macos Mojave Defaults Changed Font Fixed" width="2422" height="96" /></a>[/ecko_fullpage_image]

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

<a href="https://ahmadawais.com/fix-macos-mojave-font-rendering-issue/"><img class="aligncenter size-full wp-image-4901" src="https://ahmadawais.com/wp-content/uploads/2018/09/font-blur-issue-macos-Mojave.png" alt="Font Blur Issue Macos Mojave" width="1000" height="1013" /></a>

<p style="text-align: center;">Peace! ✌️</p>

_This was first posted at [Fix macOS Mojave Font Rendering Issue](https://ahmadawais.com/fix-macos-mojave-font-rendering-issue/)_