![](/img/trans.png)
[英]iOS: Getting NSAttributedString-Additions-for-HTML working?
[英]Getting issue on strokeWidth NSAttributedString in iOS 14
我在 iOS 14 上遇到了筆畫顏色問題。
let attributes: [NSAttributedString.Key: Any] = [
.foregroundColor: UIColor.white,
.strokeColor: UIColor.black,
.font: UIFont.systemFont(ofSize: 65, weight: .black),
.strokeWidth: -1
]
lableNumber.attributedText = NSAttributedString(string: "2", attributes: attributes)
iOS 13
iOS 14
它適用於 iOS 13,但不適用於 iOS 14。誰能幫我解決這個問題?
看起來 Apple 已經更改了 iOS 14 中的字體輪廓,6 和 9 的字形表現出類似的偽影。 我會向Apple提交錯誤。
根據您的要求,使用UIFont.monospacedSystemFont(...)
可以工作,這些字形對我來說仍然很好。 (編輯:“1”在等寬版本中也有工件。也許使用UIFont(name: "HelveticaNeue-Bold", size: 65)
代替?)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.