Core Text produces glyph run with negative width for U+2028 (line separator) character when using system font with large sizes
Originator: | st | ||
Number: | rdar://34184703 | Date Originated: | August 31 2017 |
Status: | Resolved: | ||
Product: | iOS + SDK | Product Version: | iOS 11 |
Classification: | Other bug | Reproducible: | Always |
Area: Core Graphics Summary: As the repro code below demonstrates, Core Text produces a glyph run with negative typographic width for the Unicode character U+2028 when set with the system font on iOS in larger point sizes. Steps to Reproduce: Run the following code in an Xcode 9 iOS Swift playground: import UIKit import CoreText let string = NSAttributedString(string: "\u{2028}", attributes: [.font: UIFont.systemFont(ofSize: 40)]) let line = CTLineCreateWithAttributedString(string) print(CTLineGetTypographicBounds(line, nil, nil, nil)) Expected Results: The code should print a non-negative number. Observed Results: The code prints the negative number -0.48 Version: iOS 11
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!
Apple Developer Relations, November 10 2017:
A solution is under investigation. We will follow up with you again when it is available.