Enable anti-aliasing of code view in XCode

2020-05-21 05:15发布

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.

标签: xcode
4条回答
▲ chillily
2楼-- · 2020-05-21 05:38

What you need to do to disable font anti-aliasing in Xcode has changed over ther years.

Currently, to turn off font anti-aliasing if you're running Xcode 4.6.x and OS X 10.8.x, run these two commands from a Terminal window:

defaults write com.apple.dt.Xcode NSFontDefaultScreenFontSubstitutionEnabled -bool YES
defaults write com.apple.dt.Xcode AppleAntiAliasingThreshold -int 24
查看更多
我只想做你的唯一
3楼-- · 2020-05-21 05:44

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

查看更多
\"骚年 ilove
4楼-- · 2020-05-21 05:45

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>
查看更多
一夜七次
5楼-- · 2020-05-21 05:53

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.

查看更多
登录 后发表回答