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/