首页 > 解决方案 > 在 UITextView 中,当我使用阿拉伯语应用笔画时,它无法正确应用

问题描述

一只忙碌的猫 ![文字剪切][1]

请检查我正在使用的以下代码行,

文字是 - “المس هنا لتبدأ بالكتابة” 字体是 - “Georgia-Bold”

在图像中,您可以看到字符用线条分隔 -

  let attributes = [convertFromNSAttributedStringKey(NSAttributedString.Key.strokeWidth): (0-sender.value),
                                  convertFromNSAttributedStringKey(NSAttributedString.Key.strokeColor):  pp.strokeColor,
                                  convertFromNSAttributedStringKey(NSAttributedString.Key.foregroundColor):  pp.textColor] as [String : Any]
                
                textView.attributedText = NSAttributedString(string: currentText!, attributes: convertToOptionalNSAttributedStringKeyDictionary(attributes))
                


  [1]: https://i.stack.imgur.com/mFCV3.png

标签: iosswiftuitextview

解决方案


推荐阅读