NSAttributedString:字母干扰阿拉伯字体

时间:2015-10-01 15:44:22

标签: ios nsattributedstring

我用的是阿拉伯语字体:“Hafs”,它来自这里: http://fonts.qurancomplex.gov.sa/download/UthmanicHafs1Ver09Font.zip

我用它从古兰经中画出Ayat,但是有些字母会被其他字母干扰,如图所示:

enter image description here

如何在不受干扰的情况下表示正确的文字?

感谢

修改

这是来自“Pages”应用程序的另一张照片,向您显示原始文本,我在iOS模拟器中以红色损坏的彩色字样

enter image description here

EDIT2: 我将属性字符串设置如下:

1-我将字符串粘贴到故事板中的TextView中。

2-我在相关的viewcontroller中编写了这段代码:

        let font:UIFont! = UIFont(name: "KFGQPC Uthmanic Script HAFS", size: 30)

    self.txt2.attributedText = NSAttributedString(string: txt2.text, attributes: [NSFontAttributeName:font])

0 个答案:

没有答案
相关问题