I my App. at many places I have used System Bold Font, which has became standard in my App.
If I use Attributed String by default font which appears is "Helvetica Neue". In all Fonts, I searched for System Bold Font, but could not find it.
So, how can I set System bold font when using Attributed String?
You can make it work by code. I had to face exactly same problem while assigning a attributed string to UILabel. i solved it by code. See the code bellow:
NSString *s = @"Why so serious?";
NSMutableAttributedString *str=[[NSMutableAttributedString alloc] initWithString:s];
NSInteger _stringLength=[s length];
UIColor *_red=[UIColor redColor];
[str addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:25] range:NSMakeRange(0, _stringLength)];
[str addAttribute:NSStrokeColorAttributeName value:_red range:NSMakeRange(0, _stringLength)];
[str addAttribute:NSStrokeWidthAttributeName value:[NSNumber numberWithFloat:-3.0] range:NSMakeRange(0, _stringLength)];
self.aLabel.attributedText = str;
Hope this helps. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With