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?

6
  • 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, 2012 at 3: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.
    – user687831
    Jul 26, 2012 at 9:33
  • same experience with Terminal being okay, but Xcode not respecting "no -antialias" setting
    – verec
    Jul 26, 2012 at 9: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, 2012 at 13:48
  • THIS: defaults write .GlobalPreferences AppleSmoothFixedFontsSizeThreshold 4 fixed the problem for me in TextEdit but not xCode 4.5
    – zumzum
    Jul 26, 2012 at 14:08

3 Answers 3

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.

1
  • 1
    THIS IS IT. Good job lifjoy. Worked perfectly.
    – zumzum
    Jul 26, 2012 at 18:09
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.

1
  • 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, 2013 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
1
  • Any way to do this for just Xcode? I don't want to disable font smoothing everywhere on my computer...
    – devios1
    Aug 11, 2014 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.