Please support UILegibilityWeight adaptivity when using non-system fonts

Number:rdar://FB8819005 Date Originated:22/10/2020
Status:Open Resolved:
Product:iOS & iPadOS Product Version:
Classification:Suggestion Reproducible:
In iOS, the user can enable an accessibility setting called “Bold Text” that replaces all UI with bold font variants. 

When using `+[UIFont preferredFontForTextStyle:]` (or even `+[UIFont systemFontOfSize:]`), UIKit elements such as UILabel, UITextView and UITextField are able to automatically re-render with a bold variant via private method calls build into the UIView subclasses. This mechanism seems to be completely separate to the public `UIContentSizeCategoryAdjusting` support that can be obtained with custom fonts passed through `UIFontMetrics`. 

As a result, an app that uses a custom font does not automatically adapt to the UILegibilityWeight trait collection change in the same way that it can for UIContentSizeCategory changes. As a result, many popular apps on the App Store that use custom fonts often do not include any support at all for “Bold Text” accessibility mode and it’s likely that this is probably just an oversight from the developers that unfortunately impacts the users who need this kind of feature the most.

Just like public API ‘UIFontMetrics’ and ‘UIContentSizeCategoryAdjusting’ accelerated support for dynamic type across the iOS Ecosystem, please consider adding a public API for customising fonts based on `UILegibilityWeight`. An API similar to `+[UIColor colorWithDynamicProvider:]` would be a huge help because realistically using subclasses of UILabel, UITextView and UITextField everywhere is not realistic in a modern iOS application and often not even possible in all places. 

Thanks again for your continued efforts that go into making iOS one of the most accessible platforms out there, I hope you appreciate the challenge to keep on improving things!


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!