Using Avenir Next font for UISegmentedControl causes text alignment issues
| Originator: | ljb | ||
| Number: | rdar://16895776 | Date Originated: | 13/05/2014 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 7.1/11D167 |
| Classification: | Reproducible: |
Summary: When setting the Avenir Next font supplied with iOS as the custom font for a UISegmentedControl via -setTitleTextAttributes:forState:, the alignment of the title text is off center. This should not be the case for a font that ships with the device, it is not reasonable to have to maintain a list of kludges to apply on a per font basis, not when the font in question was supplied by Apple :) Steps to Reproduce: Please see the attached sample project that demonstrates this issue. It occurs when using UISegmentedControl -setTitleTextAttributes:forState: to change the custom font used by the control to Avenir Next. Expected Results: Expected the title text to be vertically centered within the UISegmentedControl. Actual Results: The title text is not vertically centered within the UISegmentedControl, and requires fudging to align. Version: iOS 7.1/11D167 Notes: Workaround is to use -setContentPositionAdjustment:forSegmentType:barMetrics: as a kludge for Avenir Next.
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!