0

I'm attempting to render content both in a UILabel as well as in a WKWebView containing Urdu text. For display Noto Nastalique is used. However, it seems iOS has issues computing the correct spacing/ligature.

Using text from http://behdad.org/urdu/ as a test subject UILabel renders

enter image description here

while WKWebView renders (notice the glyphs overlapping)

enter image description here

In this small example the problems are most obvious in WebKit, but there are similar issues when wrapping text in UILabel. I'm hoping someone has faced and solved similar issues, or could point to information on best-practices for displaying Urdu content.

Example project can be found on github

Henrik Hartz
  • 3,677
  • 1
  • 27
  • 28

1 Answers1

1

I believe it is a problem with "Google Noto Nastaleeq" font on iPhone. Apple did try to implement in iOS 9. They had the similar problem.

Have you try to implement Jamil Noori Nastaleeq? Read my guide there I noticed Jamil Noori Nastleeq typeface don't have that kind of rendering issue.

For a reference please read my article that how I was able to make it so. https://medium.com/@mmudassir/nastleeq-and-ios-8-love-story-bit-broken-7cc2311fc784?source=linkShare-563fcf255dda-1461862616

  • Thank you @mudassir-azeemi, that font works a lot better! The downside is that it is very large, 10Mb exceeds the size of my current application archive. I found another font which is also used by urdutimes.com; [Nafees Nastaleeq](https://fontlibrary.org/en/font/nafees-nastaleeq) which is smaller and seems to render quite well in both UILabel and WKWebKit. I suspect that Jamil has superb glyph coverage, but I hope Nafees will be sufficient for simple web articles which is my current use-case. Thank you for taking time to help! – Henrik Hartz Apr 29 '16 at 11:29