UILable と UIButton の ios でカスタム フォントのカーニングを使用できますか?
以下の方法は機能しません。カーニングはシステム フォントでは機能しますが、カスタム フォントでは機能しません。誰かが問題の解決を手伝ってくれますか?
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];