Disable Xcode anti-aliasing text inside the code editor?
From Xcode9.3, text anti-aliasing can be disabled in the source editor by running the following command and restart Xcode:
defaults write com.apple.dt.Xcode SourceEditorDisableAntialiasing -bool YES
To turn anti-aliasing on again -
defaults write com.apple.dt.Xcode SourceEditorDisableAntialiasing -bool NO
Mike Ash says that he was able to build an Xcode plug-in to tell the text view to use screen fonts. It looks like this would be straightforward to do, although I have not tried it yet.
The general strategy would be (from his tweet) would be to "patch -[NSTextView drawRect:]
and do [[self layoutManager] setUsesScreenFonts: YES];
."
Update (2015-08-14): Here is an explanatory blog post from Ash and the Xcode project for his plug-in. It works for me with Xcode 6.4 if I add 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90
to the DVTPlugInCompatibilityUUIDs
. I consider this problem solved!
Update (2016-06-20): As of Xcode 8, you cannot use Xcode plug-ins, but this user default works:
defaults write com.apple.dt.Xcode NSFontDefaultScreenFontSubstitutionEnabled -bool YES