-
Notifications
You must be signed in to change notification settings - Fork 526
Open
Description
Since iOS13 you cannot get system font name by string.
The console outputs a note: CoreText note: Client requested name ".SFUI-Regular", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].
One use case is into maximumFontSizeThatFitsInRect method of M13ProgressViewBar.m
textRect = [@"100%" boundingRectWithSize:frame.size options:(NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading) attributes:@{NSFontAttributeName : [UIFont fontWithName:((__bridge UIFont*)_percentageLabel.font).fontName size:fontSize]} context:nil];
I think it should be changed in [UIFont systemFontOfSize: fontSize]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels