Cocoanetics / DTCoreText

Methods to allow using HTML code with CoreText
BSD 2-Clause "Simplified" License
6.35k stars 1.18k forks source link

iOS18 issue: paragraph spacing is losing? #1281

Closed ximmyxiao closed 1 week ago

ximmyxiao commented 4 months ago
image

As the picture says: the image attachment is being placed too tightly to the text content in iOS18 , but in iOS17 ,everything is fine .

I have debug the code ,found that DTHTMLElement::attributedString will call the appendString in NSMutableAttributedString (HTML)

image

But this call to appendString seems not call the method in the NSMutableAttributedString (HTML) in iOS18 , maybe the system provide this function it self?

And because of this method chaos , the paragraph spacing attribute is missing in iOS18 and cause the problem

ximmyxiao commented 1 week ago

the same ashttps://github.com/Cocoanetics/DTCoreText/issues/1286