Can I have Kerning for custom fonts in ios for UILable and UIButton?
Below method is not working. Kerning works for system font but not for Custom fonts. Can Somebody help in solving issue?
NSMutableAttributedString *attributedString =
[[NSMutableAttributedString alloc] initWithString:text attributes:
@{
NSFontAttributeName : [UIFont fontWithName:@"BebasNeue Bold" size:25],
NSForegroundColorAttributeName : [UIColor redColor]
}];
[attributedString addAttribute:NSKernAttributeName
value:[NSNumber numberWithFloat:kerning]
range:NSMakeRange(0, [text length])];
[self setAttributedText:attributedString];