I\'m using UITextView
and I\'m setting its font and attributed text by code.
Case 1: Custom-font - YES , attribtued text<
There is a related question here.
The main issue is that font
(UIFont
) property of UITextView
is to be applied for its text
(NSString
) property (also named "plain text") and not for the attributedText
(NSAttributedString
).
So you have to applied the "normal" font effect to your NSAttributedString
yourself.
So just replace:
NSMutableAttributedString *mutAttrTextViewString = [[NSMutableAttributedString alloc] initWithString:_textView.text];
with:
NSMutableAttributedString *mutAttrTextViewString = [[NSMutableAttributedString alloc] initWithString:_textView.text attributes:@{NSFontAttributeName:[UIFont fontWithName:@"BurbankSmall-Medium" size:16]}];