35

It's getting pretty frustrating to keep struggling with this one. I'm not sure if it's Xcode 4.4 or Mountain Lion (I installed both simultaneously), but once again my code is being anti-aliased (font smoothing) in Xcode.

I was previously able to fix this issue with the following instructions, taken from this question, but neither seem to work now:

For XCode 3.x I would do the following: defaults write com.apple.xcode AppleAntiAliasingThreshold 24.

For XCode 4 the domain of the user defaults change to com.apple.dt.Xcode. For XCode 4 defaults write com.apple.dt.Xcode AppleAntiAliasingThreshold 24 should get you what you want.

How do I get Xcode back to a useable state?

Community
  • 1
  • 1
Brent Traut
  • 5,614
  • 6
  • 29
  • 54
  • Same problem here. Though, I did have 4.5 xCode installed before I upgraded to Mountain Lion and I had no problem showing Monaco 10 before upgrading, now it's all smudged up.... Hopefully somebody has a working solution to this question. – zumzum Jul 26 '12 at 03:48
  • It is not system wide. Terminal happily uses Monaco-10 with no anti-aliasing. I am at a loss as to why xcode doesn't simply use the system defaults. –  Jul 26 '12 at 09:33
  • same experience with Terminal being okay, but Xcode not respecting "no -antialias" setting – verec Jul 26 '12 at 09:55
  • Yah agree, terminal is fine. Also, I had a TextEdit document unsaved that used Monaco 10 before upgrading to Mountain Lion. After upgrading I open TextEdit, the document came up and Monaco 10 looked good. So I made a new document and started using Monaco 10 in it too but the same font didn't look sharp anymore. So I have 2 documents using the same font, but they look different. Weird. – zumzum Jul 26 '12 at 13:48
  • THIS: defaults write .GlobalPreferences AppleSmoothFixedFontsSizeThreshold 4 fixed the problem for me in TextEdit but not xCode 4.5 – zumzum Jul 26 '12 at 14:08
  • How did you manage to disable anti-aliasing in Terminal? I've tried all these methods, and they don't succeed. – cnst Nov 16 '13 at 05:18

3 Answers3

38

From the Release Notes: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW680

Text and font rendering on OS X v10.8 is optimized for Retina display. On a non–Retina display running OS X v.10.8, some font configurations can appear blurry in Xcode. 11486875 Switch back to non–Retina display optimized text and font appearance in Xcode by enterin this command in Terminal:

defaults write com.apple.dt.Xcode NSFontDefaultScreenFontSubstitutionEnabled -bool YES

It worked for me on Mac Pro running Xcode 4.4 on Mountain Lion.

Cœur
  • 37,241
  • 25
  • 195
  • 267
lifjoy
  • 2,158
  • 21
  • 19
5

I also had this problem when upgrading to ML. System Preferences > General > Untick 'Use LCD font smoothing when available' seemed to fix it for me.

dbau
  • 16,009
  • 2
  • 21
  • 31
  • 1
    This didn't get rid of the anti-aliasing but it did make the text in Xcode 5 go from looking bold to looking like a regular type face. Thanks for the tip! – PeqNP Nov 19 '13 at 20:39
5

lifjoy's answer didn't work for OS X 10.8.2 and XCode 4.5, so I have found another solution:

defaults -currentHost write -globalDomain AppleFontSmoothing -int 0
Ivan Mir
  • 1,209
  • 1
  • 12
  • 32
  • Any way to do this for *just* Xcode? I don't want to disable font smoothing everywhere on my computer... – devios1 Aug 11 '14 at 18:00