-[UIFont fontWithSize:] doesn't retain font weight
| Originator: | futuretap | ||
| Number: | rdar://21946808 | Date Originated: | 22-Jul-2015 09:52 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 9.0b4 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: Sending -fontWithSize to a system font with a custom weight always returns a font with regular weight. Steps to Reproduce: (lldb) po [UIFont systemFontOfSize:40 weight:-0.9] <UICTFont: 0x7feab437e400> font-family: ".SFUIDisplay-Ultralight"; font-weight: normal; font-style: normal; font-size: 40.00pt (lldb) po [[UIFont systemFontOfSize:40 weight:-0.9] fontWithSize:40] <UICTFont: 0x7feab42ad460> font-family: ".SFUIText-Regular"; font-weight: normal; font-style: normal; font-size: 12.00pt Expected Results: The second call should return the exact same font as the first. Actual Results: It returns font-family: ".SFUIText-Regular" instead of ".SFUIDisplay-Ultralight". Regression: This problem also existed in iOS 8.4. Haven't tested prior releases.
Comments
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!