NSParagraphStyle don’t respect LINE SEPARATOR, and rendering is affected by dummy parameters

Originator:nicolas.bouilleaud
Number:rdar://17572143 Date Originated:2014-09-30
Status:Open Resolved:
Product:iOS SDK Product Version:8.0
Classification:Serious Bug Reproducible:Always
 
Summary:
LINE SEPARATOR (\u2028) in NSAttributedString should not start new paragraphs, and NSParagraphStyle.paragraphSpacing should not be used between two lines separated by this character.

Rendering (in UILabel) doesn't respect this. Additionally, when adding a dummy attribute to the NSAttributedString, rendering is suddenly fixed.

Steps to Reproduce:
See attached project, with two UILabels with the same settings, same attributed string, except for one "dummy":"dummy" attribute.

Expected Results:
Of course, both labels should render exactly the same, and the paragraph spacing should be ignored between two lines separated by LINE SEPARATOR (\u2028).

Actual Results:
The NSAttributedString without the dummy attribute isn't rendered correctly. There's unwanted space between the two lines separated by LINE SEPARATOR (\u2028).

The NSAttributedString with the dummy attribute renders correctly. (!)

Version:
iOS 7.1.2, as well as iOS 8b2

Notes:


Configuration:
iOS Simulator 7/8beta2, iPod touch (8b2), iPhone 5 (7.1.2)

Attachments:
'AttributedWTF.zip' and 'iOS Simulator Screen Shot 7 juil. 2014 09.30.51.png' were successfully uploaded.

http://cl.ly/1K1a122F3z2k/download/AttributedWTF.zip

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!