tags:

views:

1595

answers:

3

Is there any way to get XCode to render text in the editor with anti-aliasing enabled? I can't see anything in the preferences dialog that would do it.

+5  A: 

XCode text is already anti-alaised. Check to make sure the font size is larger than specified in:

System Preferences -> Appearance.

If it is larger than that you can try this command at the command line to edit the application setting for xcode.

defaults write com.apple.xcode AppleAntiAliasingThreshold -int <font-size>
defaults write com.apple.xcode AppleSmoothFontsSizeThreshold -int <font-size>
Adam Peck
I'm sure it's not anti-aliasing - and this is a fresh MacBook that's had nothing but Xcode loaded onto it so far. I tried your setting with a size of 4 (which is what the system prefs setting has by default) and it made no difference. I'll try posting a screenshot.
U62
Try increasing your font size. If that makes it antialaised then there must be some other setting restricting it from doing it.
Adam Peck
+3  A: 

The default code font in Xcode and Terminal is 10-point Monaco, which is traditionally not anti-aliased because there are hand-tuned bitmaps for this.

You can use the Fonts & Colors pane in the Xcode Preferences to have Xcode use whatever fonts, sizes and colors you prefer. For example, you could use 11-point Monaco or larger if you want anti-aliased text, or you could use one of a number of bitmap-only programming fonts at their native sizes if pixel-sharpness matters to you.

Personally, I rather like Courier 12 and Inconsolata 13 for coding. Courier comes with Mac OS X, while Inconsolata is a free monospaced font from Raph Levien.

Chris Hanson
Thanks! Being a Mac newbie it never occured to me that it depended on the size of the typeface - on Windows you enable cleartype and everything is anti-aliased forevermore.
U62
It's not just based on the size of the typeface - it's based on both the size and the presence of a tuned bitmap version of the font at that size.
Chris Hanson
+3  A: 

Just a hint: To change the font for all categories in xcode click inside the category table, press cmd+a and double click somewhere in the category table. The changes you apply in the Fonts dialog afterwards are applied to all categories.

Hope this helped

stigi
This was really helpful. Thanks.
Tiago