10

How does one disable antialiasing inside the code editor in Xcode, but not system-wide?

Emil Laine
  • 41,598
  • 9
  • 101
  • 157
Jaime Cham
  • 1,494
  • 1
  • 15
  • 16

3 Answers3

11

For Xcode 3.x the necessary terminal command is:

defaults write com.apple.xcode AppleAntiAliasingThreshold <some integer value>

For Xcode 4 & 5 it is:

defaults write com.apple.dt.Xcode AppleAntiAliasingThreshold <some integer value>

For Xcode 6 you may first need to enter the following at a terminal console:

defaults write com.apple.dt.Xcode NSFontDefaultScreenFontSubstitutionEnabled YES

Then, as per usual:

defaults write com.apple.dt.Xcode AppleAntiAliasingThreshold <some integer value>

Using AppleAntiAliasingThreshold 24 should get you what you want.

Benjamin R
  • 555
  • 6
  • 25
Evan
  • 6,151
  • 1
  • 26
  • 43
  • 1
    Works after restarting XCode, and you'll need to choose a font other than the default 'Menlo' which seems to stay aliased no matter what you do. On the other hand, you could choose Monaco which seems to be always anti-aliased no matter what you do (this is the default font for the terminal). – iforce2d Nov 26 '11 at 15:32
  • Edit: ah... 'Monaco' only does that for 10pt or smaller. – iforce2d Nov 26 '11 at 15:38
  • It makes Terminus (my favorite console font) look like crap! It might be something wrong with the font though. – dkaranovich Dec 27 '11 at 19:35
1

so this does work, but in order for it to take effect, you must:

go to preferences->appearance and change "turn off text smoothing for font sizes" and set the font pt. size.

other commands that are helpful:

defaults -currentHost write .GlobalPreferences AppleSmoothFontsSizeThreshold -int 16

defaults -currentHost write .GlobalPreferences AppleFontSmoothing -int 0

also, if you just want to change a specific application, instead of everything, this does the trick:

defaults write com.apple.safari AppleSmoothFixedFontsSizeThreshold -int 16

defaults write com.apple.safari AppleSmoothFontsSizeThreshold -int 16

defaults write com.apple.safari AppleAntiAliasingThreshold -int 16

this will turn off anti aliasing for any font that is smaller than size 16.

I had this same problem for editing code, took me ages to work it out.

Also, you can change any application you want, just check out your installed apps, from a command terminal cd to ~/Library/Preferences and then ls to see the referencable names of installed apps.

Hope this helps someone!

Emil Laine
  • 41,598
  • 9
  • 101
  • 157
bigglestix
  • 47
  • 2
  • The original questions is how to disable font antialiasing just in XCode 4. Using "defaults write com.apple.XCode ..." doesn't seem to work. – Mark Fowler Mar 28 '11 at 22:47
  • you need to read the entire post. it works, however you need to do all three, and also set the option in system preferences to turn off text smoothing for specific font size. – bigglestix Apr 04 '11 at 21:38
-1

defaults write com.apple.dt.Xcode AppleAntiAliasingThreshold 24 definitely works !

Many thanks for this : on my CRT, antialiasing = blurring. So, like Jaime Chan, i used to turn off antialias in xcode 3.x

Chrysotribax
  • 789
  • 1
  • 9
  • 17