Cocoanetics/DTCoreText — pull request #108 by gotosleep (2012-01-18 19:12:57+00:00)
Title: Improvements from Float

Hey Oliver,
I have taken over work on Float and ended up making a few changes to DTCoreText.

1) I added support for the concept of unsupported tags in NSAttributedString+HTML. We use this to filter out tags like "object", "video", and "iframe". Our app doesn't support these so they ended up just creating giant whitespace gaps.

2) In a few cases, we had image tags that pointed to local files which didn't exist, this again would lead to large gaps of whitespace. So, if the image file is missing, I changed initWithHTML to skip over the img tag.

3) I made 2 changes to correctLineOrigins in DTCoreTextLayoutFrame. I changed the line height calculation to use the lineHeight method from the DTCoreTextLayoutLine class. This seemed to make more sense than repeating logic. Second, I commented out the call to correctLineOrigins altogether. As far as I could tell, the method is completely unnecessary. If you decide to keep correctLineOrigins, I think my changes to the method are still an improvement.

4) There were some methods commented out that people thought unused, but Float actually was using them, so I uncommented them.

I think that covers everything. Let me know if you have any questions.