Skip to content

Instantly share code, notes, and snippets.

@MTuner
Last active March 31, 2023 21:44
Show Gist options
  • Save MTuner/3ee1e24b58808b2cd6b17c3a176b832e to your computer and use it in GitHub Desktop.
Save MTuner/3ee1e24b58808b2cd6b17c3a176b832e to your computer and use it in GitHub Desktop.
Fixing font rendering/aliasing in Sublime Text in MacOS Mojave
Apple removed colored sub-pixel antialiasing in MacOS Mojave
(https://developer.apple.com/videos/play/wwdc2018/209/ starting from ~28min)
To make fonts look normal in Sublime Text, add to Preferences:
// For the editor
"font_options": [ "gray_antialias" ],
// For the sidebar / other elements
"theme_font_options": [ "gray_antialias" ],
@pdxmike
Copy link

pdxmike commented Apr 9, 2019

Thank you!

@frou
Copy link

frou commented May 23, 2019

The original Gist does not make sense to me.

Sub-pixel AA (i.e. coloured fringes) is what we want, and what was the default in macOS 10.13 and before. So why explicitly set Sublime to use Greyscale AA? That's just doubling down on choosing worse AA (explicitly setting it in Sublime even though it's what macOS 10.14 does out of the box anyway).


When using the "defaults write" mechanism, rather than affecting every app on the system, I think it's better to scope it to only affect particular apps you have issues with, e.g.

# Re-enable sub-pixel (as opposed to only greyscale) font AA on macOS 10.14+
defaults write com.sublimetext.3 CGFontRenderingFontSmoothingDisabled 0

p.s. It's not worth doing the above if you use a Retina/HiDPI display. Greyscale font AA looks fine at high DPI, which is probably why Apple chose to make their change. Though, I don't understand why they didn't limit it to only when a Retina display is being used.

@robmathews
Copy link

Thank you, I've been suffering with this for months.

@bartkl
Copy link

bartkl commented Nov 2, 2022

Oh wow, this helped me on Linux as well! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment