Fix macOS Mojave Font Rendering Issue |
Big Sur Update
Ahmad 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
β οΈ 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
.
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
- defaults β access the Mac OS X user defaults system
- βg | βglobalDomain | NSGlobalDomain β Specifies the global domain. β-gβ and β-globalDomainβ may be used as synonyms for NSGlobalDomain
- CGFontRenderingFontSmoothingDisabled β the setting which I wanted to disable to enable the font smoothing
- βbool [ean] β Allows the user to specify a boolean as the value for the given preference key. The value must be
TRUE/YES
or FALSE/NO
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.
π 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!
β οΈ 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.
Peace! βοΈ
Having the same issue after you upgraded to macOS BigSur? Well try this:
The macOS Big Sur seems to have removed the font smoothing setting, but you might use a terminal command (reboot required (maybe?!)):
defaults -currentHost write -g AppleFontSmoothing -int 0
JUST A NOTE!
π¨βπ» 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 β
π¨
Developers Takeaway
Stay ahead in the web dev community with Ahmad's expert insights on open-source, developer relations, dev-tools, and side-hustles. Insider-email-only-content. Don't miss out - subscirbe for a dose of professional advice and a dash of humor. No spam, pinky-promise!
β¨ 172,438 Developers Already Subscribed
Ciprian Tepes
Whoa, thanks, works like a charm for external non-retina displays.
Thanks again
Ahmad Awais
Glad it helped. π
Juan
Thank you!
I was having horrible font rendering on my 2016 MacBook Pro (Retina!)
I hope Apple does not remove this functionality from future macOS releases.
Ahmad Awais
Glad you liked it! π―
Lately, Apple has been doing some really weird stuff without caring about what an average user would have to deal with.
Phong
Thank you! Thought there was something wrong with the General font settings!
Fede
Whats is the app that you use for terminal
Ahmad Awais
For that, you need to visit https://AhmadAwais.com/uses β
I have built several π¦ Shades of Purple themes starting from VSCode, and for my terminal i.e. iTerm2 which also has Zsh theme in it, and the same for Hyper.
Peace! βοΈ
kaiserkiwi
Thank you. It was quite ugly on a normal screen. Now I can work again
Ahmad Awais
Ugly as heck. Glad we fixed it together.π
paul
a huge thank you for having solved a troublesome problem caused by the superficiality of apple
Ahmad Awais
That’s very kind of you to say! π
Hugo Robles
I LOVE by your solution !
My head Was going to explode!!!
:D !
Ahmad Awais
Glad you liked it! π―
Marek
Thanks, huge help <3 I immediately noticed that something's changed and fonts are thinner than before…
I also think I know why they disabled it β it seems (to me) to cause some stutter when swiping between virtual desktops on a retina display (on an external 1080 it's very smooth though). Probably they made some changes and now smoothing is quite taxing on higher resolutions :/
Ahmad Awais
Maybe, but what about non-retina stuff, they can’t just go about and make us buy all those dongles and now new monitors? That’s an insane price to pay.
kbhooper
I can’t believe how well this works, so thank you for sharing the solution.
Does anyone know what this command actually does? I’ve read that it’s not exactly re-enabling subpixel antialiasing, but possibly adding weight around the font edges.
I’m actually worried Apple will find a way to disable it in a future update rather than fix the issue.
Cheers.
Ahmad Awais
That’s very kind of you to say! π
So, I am going to update the post to make sure people get the explanation well. Short story is Apple had disabled font smoothing by default and this one enables it. It’s basically doing so by disabling the disabler. :P
They already know about this. π
Rodrigo Jara
Thank you!
AhmadAwais
Super glad it worked for you. π―
William Carlson
Thank you, you were the first to fix it. Made all the difference.
AhmadAwais
Oh kind of you to say. π
Timothy Reid
Woho, this one thing fixed it, htanks ahmad
AhmadAwais
Glad it did for you! π
Melissa Roberts
As a designer I needed this to work and it did. Super thanks!
AhmadAwais
TrueThatβ’
Janice Medina
just wow. no words. apple need to fix this it this way
AhmadAwais
Glad it work for you! β
Frank Bradley
That did it for me, thank you
AhmadAwais
Super glad.
Rebecca Franklin
WOW IT WORKED β I was about to go see doctor for my eyes.
AhmadAwais
Nice. Glad it work for you! π
Samuel Henry
Thank you, that just works. Apple, fix this god da** machine?
AhmadAwais
Gld it work for you! π
Amanda Ferguson
You’re a god send π
AhmadAwais
That’s very kind of you to say! π Gld it work for you! π
Julie Larson
This this this. I was messing with old `FontSmothing` property wondering what was up.
AhmadAwais
Gld it work for you! π
Samantha Phillips
thank you it works for me
AhmadAwais
Gld it work for you! π
Hannah Burns
That did it for me. Macbook 13.
AhmadAwais
Gld it work for you! π
Ashley Miller
Thank you Awais this works.
AhmadAwais
Gld it work for you! π
Ann Boyd
First time I did something in terminal and it worked. feels like hacking hahaah
AhmadAwais
Gld it work for you! π
Fatih Turan
Hi Ahmad,
Thanks for sharing the tip. But do you know any information about performance downgrade after enabling font smoothing with this command?
Greets.
Ahmad Awais
Yeah, I have no idea, but there shouldn’t be any performance downgrade. I have not experienced any. π€
Jean-Marc Joseph
I have an external 34″ widescreen LG monitor (3440×1440) and even with this Terminal trick, my fonts look crap. It doesn’t look blurry, it’s actually quiet the opposite, meaning it looks over crispy.. like pixellated, like if there was no antialiasing at all. …
It drives me crazy.. I’ve tried it all.
Anyone experiencing the same issue?
Ahmad Awais
Have you restarted your laptop after trying this tip out? π€
Justin
Works as expected. Thanks
Ahmad Awais
Yahoo! π
Bozemoj
Hey Ahmad, thanks for this trick, however it works only in certain apps for me (Chrome, Sketch) but not in Finder (and other native Apple apps), Adobe CS, Spotify..
Is it possible to force it system-wide on all apps?
Thanks!
Ahmad Awais
It’s not. Subpixel rendering is gone. This is just font smoothing which works for a select few apps. Sadly, asking Apple for that might help.
Bozemoj
yeah, apple listens usually :)
Ahmad Awais
Usually they don’t but let’s hope for the best.
Ethan Deveau
This fixed the problem within text editors and other apps, but (at least for me) makes all the native text (like pop-ups from right click and menu bar) thinner. Like if the problem just were flipped. By the way I like your editor font, it is Ubuntu Mono?
Ahmad Awais
Subpixel rendering is gone. This is just font smoothing which works for a select few apps.
No, it’s a $200 premium programming font. Why don’t you visit https://AhmadAwais.com/uses page to read about my theme/font setup and more.
Adi Pur
Oh man.. you’re such a lifesaver ! Thank you.
Took me a while to notice why there’s something off after upgrading to Mojave.
Ahmad Awais
I know what you felt. βοΈ
bbzy
You just saved my day. Thanks!
Ahmad Awais
π
Adhun
Thanks a lot bhai.
Ahmad Awais
Glad it helped, bhai! β
Gary
Thank you for that simple fix, Ahmad. I was getting a headache looking at the default font using Mojave on my MBA. Much improved!
Ahmad Awais
Happy to help, π
Mattia
Kudos!
Radek
Helped a lot thanks guy!
pierpaolo
hello, can i revert the older settings?
Ahmad Awais
Yes, you can. To revert back to the default/older settings run the following command:
defaults write -g CGFontRenderingFontSmoothingDisabled -bool TRUE
pierpaolo
Thanks man! π
Ahmad Awais
Sure thing :) π―
Vitaly
Oh, yeah! Thanks a lot!
Ahmad Awais
πππ
David
This fix actually worked for my Asus 24″ 4K screen as well, which is where the problem was more glaring than on my 24″ 1080p Asus ProArt.
Ahmad Awais
Glad to know. I am thinking of buying a 4k LG and was on the fence with Mojave. π€
Martin
Cool, works like a charm. Thanks a lot!
Ahmad Awais
Yuppieee! π―
Dmytro Beznos
Awesome! Thank you very much!
Ahmad Awais
Glad you liked it! π―
Filipe
Thank you, dude! The fix was very helpful.
Ahmad Awais
Happy to help. π
roberto
thanks man, that bothered me as soon as I upgrade to Mojave
Ahmad Awais
Glad to help. π
Liaofan
This is a quick fix. Thank you!
Ahmad Awais
Yay! π
Scott
Nice work Ahmad! I ran into the exact same VSCode / font issue. It was so annoying, that I literally erased my hard drive and went back to High Sierra. On two computers.
On iMac/non-retina & MacBook/retina, the fonts were just too light. I had to use a bold version of Menlo on the MacBook and I didn’t like that. And on the iMac, the fonts just looked crappy.
Just to be clear, you’re saying that changing that font rendering config setting will change Mojave font rendering back to the same as it is on Hight Sierra?
Ahmad Awais
No it won’t make it same as it was on High Sierra. We had font subpixel rendering back then which is not there now. But it will switch on the font smoothing. That helps.
nuttajon buraphapipop
Thanks you are best :D
Jake Sevins
I’m not an Apple expert and I just “upgraded” to Mojave today only to discover that my fonts looked horrible. So glad you published this fix. I will never understand why big companies like Apple opt to set defaults that ruin their customers’ experience like this.
Ahmad Awais
Happy to have helped. Well, I think they have their reasons β but not giving us an option to keep using our old hardware is not a fair play.
Antony Hill
Wow – that is excellent – well done!
Ahmad Awais
Happy to help.
Peter Ogilvie
I’ve been so sad trying to work the last couple of days. I though I was crazy or I was going blind. Apple why did you do this? Thank you so much!
Ahmad Awais
Super happy you are glad. π
Scott
OMG thank you!
Guillaume
Many thanks !!!
Works perfect on my externals screens.
As I seen, only my internal MacBook Pro screen was impacted by the font smoothing option in the Mac settings.
Ahmad Awais
Happy to help. π
Adrien
Hmm. I’m not seeing any improvement, and in fact, it seems to be worse. Now letters seem squished and some like an uppercase “L” have a thick vertical line and a thin horizontal stroke rather than the same thickness for both. With the setting as TRUE, the main issue I find is with context menus. All of them render in a horrid pixelated state. Overall, the whole UI is bad, but those context menus look like someone drew fonts on graph paper.
Ahmad Awais
Strange you’re the first report like this. Feel free to revert back by running the following command.
defaults write -g CGFontRenderingFontSmoothingDisabled -bool TRUE
Adrien
I did thanks. I was using the new Dark mode, so I switched to Light mode to see if there was any improvement. The text in the menus looked better, but on close inspection, I see that the same pixelation is there, just not as obvious. And sorry I didn’t note earlier, but thanks for the post and tips. And nice blogβsubscribed!
Ahmad Awais
Glad to be able to help. π
That’s very kind of you to say! π I am soon going to release #OneDevMinute videos full of dev tips β right now focused on releasing my VSCode Power User course in the next two weeks (spent this whole year on it).
Peace! βοΈ
Deborah
This only worked for me half way. Every time I import a pdf into notability or open it with safari it becomes a scrambled image. once I followed the instruction above it fixed it some what but not all the way.
Deborah
Nvm… I got it
Ahmad Awais
Cheers!
Gaurav
Thanks a ton! I was having the problem with VS Code after recent update to Mojave. This fix worked like a charm, and the IDE is usable again.
Ahmad Awais
Yay!!! π
Noel
Worked brilliantlyβthank you very much, indeed!
Adam K
Thank you! Big Life Saver!
Ahmad Awais
Yay!!! π
Konekoya
Thanks, this works perfectly for me. Thank you!
Jay
I’m a UX designer for a software company (web app). This font issue is apparent for our Mojave users. While I can use your solution/settings with success, we cannot push that onto our users. Before going through the pain of selecting a new font that displays better without your settings, do you have any insight into what Apple is doing about this? Do they intend to roll back the setting at some point, or find another solution for this?
Ryan
Thanks… first thing I noticed after the upgrade.
Bachsau
I will thank apple for ditching that subpixel shit. Always looked like the moirΓ© on bad scans.
James
I’m the bearer of bad news. It does NOT work, at least, not on Mojave 10.14.2 and not in Dark Mode and not on a 5K iMac. Here’s how I know. Before the Terminal command hack and while in Dark Mode and with Font Smoothing enabled, I took a screenshot (full resolution of my 5K screen). I then turned OFF Font Smoothing and took another screenshot. I then performed the Terminal command hack and turned ON Font Smoothing and took another screenshot. I then opened my graphics editor and pasted all 3 screenshots atop each other so all pixels were perfectly aligned, with each screenshot on its own layer. I then disabled individual layers to compare. I zoomed into closely to see each pixel perfectly. I can confirm that there is NO DIFFERENCE between Font Smoothing ON before and after the Terminal Command Hack. No difference!
I’ve read that such hacks worked on the BETA versions of Mojave but then not in the release versions, and my testing seems to prove that to be true. So unless you find another Terminal command that can work around Apple’s stupidity, we are left without subpixel antialiasing. If some of you are doing the same test as mine and actually seeing a difference, then you must be using a low resolution display. Again, in my testing on a 5K iMac (late 2015 model), I cannot see any difference at all when pixel-peeping.
Ahmad Awais
Did you read it correctly? You have to log out and log in for the setting to take effect. I myself tested it and it does work on Mojave.
Anke
I used this setting on this same computer earlier, and it worked like a charm. Yesterday, I did a clean install of a brand new Mojave (10.14.2) and indeed, as James just said, it does not seem to work anymore. For clarity; I tried it several times, restarted, logged in and out and there’s no difference anymore.
However, I am 100% positive it did work some months ago.
Could you point me to where to read out the settings, so I can see if it affected the settings at all?
Thank you!
(VScode looks horrible to me now.. )
Anke
Ha, got it to work eventually.
– I made sure the ‘Use font smoothing when available’ checkbox (System prefs > general) Was checked _before_ applying the fix.
(Afterwards, it did not work; it might reset a setting)
– I did a full restart
– I tried the command on the native terminal, and not from iTerm2.
I don’t know which of these changes actually affected the fix, but I got it to work now.
I hope this comment can help other people that have initial problems applying this fix.
Have a good day!
Andy
Thanks Ahmad, this was driving me nuts :-)
Brian
This seems like it was left off of Mojave for a reason, as I noticed odd rendering behavior. For example, I rotated a monitor and my IDE text became barely readable, even though it was smoother. Funny enough, getting newer version video cables fixed the issues for me. For example, using an HDMI 2.0 cable vs HDMI 1.x cable made things nice and crisp again.
alexander
Im currently migrating from a old dell win10 workstation running nvidia 970, and i got a mac pro 5.1 running amd rx580. The rendering command made a huge difference for me regarding SecureCRT, but thing became really obvious. I have 3 x27 ASUS screens (display port 1.2 along with DVI) 2560×1440. On my windows the font for applications, along with the websites is notably sharper – like much sharper and cleaner. This is first time i have a side by side comparison and its just obvious that the win10 is just cleaner. Im almost at the point that i want to put win10 on this mac pro, because the font rendering is crap. Have any of you seen this type of behavior? Also trying to find a way to tweak AMD drivers (maybe steal from Linux Distro)…….
Bill
I’m having a different issue, stranger one I think. FYI: running 10.14.4 on a brand new iMac Pro. Some applications cannot display the correct font at all, instead the space is just filled with question marks in squares. So far I’ve noticed this in the help section of Cinema 4D r20, and in Element 3D, a plugin for After Effects. Very weird, still don’t have a solution.
Anwar
This saved me to downgrade to High Sierra. Thanks a lot.
I have one question, How can I explore the defaults database to see what defaults are set by mac. I’m new to mac (Hackintosh) and want to learn
Ahmad Awais
Instead of
write
you can useread
to check the value of default.Jan
Worked like a charm!! Wohooo! :) Thank you.
Setup: MacBook Pro 2013 Retina, external monitor Dell U2415.
Hopefully, the future release of OS Catalina won’t change it. It’s coming soon…
// Jan
Natalia
Life saver, thank you! VSCode on the external display was unreadable.
Ahmad Awais
Yay!!! π
Andrei
Does not help with Catalina
sentridev
What terminal are you using and what’s the font on it?
Looks quite awesome!
Ahmad Awais
Thank you! π
That’s my own theme suit called π¦ Shades of Purple β
You can learn more about what I use on my USES page.
Faatimah
Hi there,
I have a non-retina MacBook pro mid 2010 and upgraded my OS to High sierra. I’m having issues with font blurring. I have used the following commands in terminal which work after restarting my machine:
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
defaults -currentHost write -globalDomain AppleFontSmoothing -int 3
The trouble is I have to do this every time I turn on my machine and do a restart. There must be a more permanent way to keep this effect?
Any advice would be much appreciated. If there isn’t a more permanent solution I may have to go back down to Sierra instead.
Many thanks