Core Animation and Anti Aliased Fonts on the Mac

可紊 提交于 2020-01-02 04:53:22

问题


I'm trying to create a view that is backed by a Core Animation layer. However, when I enable the layer, my labels start to look slightly jagged. I've attached a demonstration of difference:

I know it is subtle, but it is driving me crazy (especially for smaller fonts). Any way I can get the Core Animation layer labels to be anti-aliased?


回答1:


Nitpick: the Core Animation layer is anti-aliased, but at a lower quality – it doesn’t use sub-pixel anti-aliasing. The reason for this is that sub-pixel anti-aliasing requires per-channel blending, which can’t be done cheaply with hardware compositing.

The example linked from here demonstrates various ways of working around this problem.



来源:https://stackoverflow.com/questions/5276433/core-animation-and-anti-aliased-fonts-on-the-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!