关于swift:在非retina Macs上使用NSAttributedString绘图时字体渲染模糊 | 珊瑚贝

Blurry font rendering on non-retina Macs when using NSAttributedString drawing


我在 NSView 中使用 NSAttributedString 的 draw(at:) 函数在我的窗口中以自定义字体呈现一些文本。
但是,在非视网膜 MacBook 上运行时,字体看起来非常模糊和”太重”(都在内部显示器上)


这可能是臭名昭著的”半像素”问题。试试:

1
drawableString.draw(at: NSPoint(x: 0.5, y: 0.5))

这里有一些关于此的信息(在页面上搜索”点和像素”)。


来源:https://www.codenong.com/55540955/

微信公众号
手机浏览(小程序)
0
分享到:
没有账号? 忘记密码?