在 Mountain Lion 的 Xcode 4.4 中禁用抗锯齿字体

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11660895/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 01:01:38  来源:igfitidea点击:

Disable Anti-Aliasing Fonts in Xcode 4.4 in Mountain Lion

xcodeantialiasingosx-mountain-lionxcode4.4font-smoothing

提问by Brent Traut

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.

继续与这个问题斗争变得非常令人沮丧。我不确定它是 Xcode 4.4 还是 Mountain Lion(我同时安装了两者),但我的代码再次在 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 24should get you what you want.

对于XCode的3.x中我会做到以下几点:defaults write com.apple.xcode AppleAntiAliasingThreshold 24

对于 XCode 4,用户默认域更改为 com.apple.dt.Xcode。XCode 4defaults write com.apple.dt.Xcode AppleAntiAliasingThreshold 24应该可以满足您的需求。

How do I get Xcode back to a useable state?

如何让 Xcode 恢复到可用状态?

回答by lifjoy

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

来自发行说明: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:

OS X v10.8 上的文本和字体渲染针对 Retina 显示进行了优化。在运行 OS X v.10.8 的非 Retina 显示器上,某些字体配置在 Xcode 中可能会显得模糊。11486875 通过在终端中输入以下命令,切换回非 Retina 显示优化文本和 Xcode 中的字体外观:

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

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

它适用于在 Mountain Lion 上运行 Xcode 4.4 的 Mac Pro。

回答by dbau

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.

升级到 ML 时我也遇到了这个问题。System Preferences > General > Untick 'Use LCD font smoothing when available'似乎为我修好了。

回答by Ivan Mir

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

lifjoy 的回答对 OS X 10.8.2 和 XCode 4.5 不起作用,所以我找到了另一个解决方案:

defaults -currentHost write -globalDomain AppleFontSmoothing -int 0