IB: Custom Fonts stripped from UILabel in different size classes

Originator:fchary
Number:rdar://26154959 Date Originated:05/06/2016
Status:Duplicate of 18535469 Resolved:
Product:Developer Tools Product Version:Xcode Version 7.3 (7D175)
Classification: Reproducible:Always
 
Summary:
In Interface Builder (IB), when we set a UILabel to use a custom font, and then define a *different* font for a separate size class (by using Interface Builder's Size Class Customization), the label is stripped of both Font name & size at runtime.

Steps to Reproduce:
1. Using Xcode 7.3, start a new project with a storyboard.
2. Add a custom font to the project. See fonts added in attached project. Ensure font is added correctly (ie. added to build phases & *.plist)
3. In the Main storyboard, add a new UILabel. Set the font of the label to the custom font. This should be in the Any/Any size class.
4. Next to the 'font' field in the inspector, click on the '+' button to add a new size class-based font to the UILabel. Pick Regular/Regular to get an iPad-specific size class.
5. Set a different font size for the Regular/Regular size class, but ensure that you are still choosing a font that was added to the project directly.
7. Run the project on both iPhone and iPad.

Expected Results:
I would expect the fonts defined in the Label Inspector to be displayed in the UILabel at runtime.

Actual Results:
The fonts in the UILabel at runtime seemed to be standard size, and System font.

Version:
Xcode Version 7.3 (7D175)
OS X 10.11.4 (15E65)

Notes:
When I select a custom font that already exists in the OS, this problem does not occur. This only seems to occur when I use a font that I've added directly to the project.

Comments

Marked as Duplicate of 18535469


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!