UITextView renders custom font incorrectly in iOS 7

Solution 1:

I debugged this issue a little, and it seems to be a bug in the way NSLayoutManager layouts the text. As other answers pointed out, UITextView is build around TextKit since iOS7, and thus uses NSLayoutManager internally to layout text. UILabel uses Core Text to layout text directly. Both eventually use Core Text to render the glyphs.

You should open a bug report with Apple and post the number so people can duplicate it. The issue has not been fixed so far in iOS7.1 betas.

As a workaround, you can replace UITextView with other Core Text alternative editors, which layout and render directly with Core Text, where the issue does not exist.

I tested SECoreTextView, and it shows the text correctly. It implements a similar API to UITextView but internally uses Core Text.

Here is how it looks after swapping UITextView with SECoreTextView:

SETextView *textView = [[SETextView alloc] initWithFrame:CGRectMake(0, 0, 100, 40)];
textView.center = CGPointMake(self.view.center.x, self.view.center.y+40);
textView.font = [UIFont fontWithDescriptor:desc size:24];
textView.text = @"ܩ̈ ܡ̄ ܬ̇ ܒ̃";
textView.textColor = [UIColor blackColor];
textView.backgroundColor = [UIColor whiteColor];
textView.editable = YES;

[self.view addSubview:textView];

Using Core Text, the layout issue does not exist.

Solution 2:

Some days ago, I had the same problem as yours in iOS 7 (but the font was different). I set the FONT after setting the TEXT and it worked for me. So for your case:

textView.text = @"ܩ̈ ܡ̄ ܬ̇ ܒ̃"; // Setting the text.
textView.font = [UIFont fontWithName:@"East Syriac Adiabene" size:24]; // Setting the font and it's size.

It may seem silly, but it worked for me.

Also see this question/answer. There are many tips for using custom fonts with UITextView, which may be helpful for you.

EDIT :

iOS 7 also introduced a new selectable property on the UITextView for enabling text selection. So make sure you have done the following:

self.textField.editable = YES;
self.textField.selectable = ON;