Cocoanetics / DTCoreText

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

iOS18 issue: paragraph spacing is losing? #1281

Open ximmyxiao opened 1 month ago

ximmyxiao commented 1 month 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