Permalink
Browse files

Updated both readies with known differences between Mac's initWithHTM…

…L and DTCoreText.
  • Loading branch information...
1 parent 93dbb90 commit 86b15018d130718952e4b5d7e03d626f3b7dccbe @odrobnik odrobnik committed Feb 2, 2012
Showing with 18 additions and 0 deletions.
  1. +9 −0 Demo/Resources/README.html
  2. +9 −0 Readme.markdown
@@ -16,6 +16,15 @@
<li>Unordered Lists <b>LI</b></li>
<li>Ordered Lists <b>OL</b></li></ul>
<p>Currently attributes are inherited from enclosed tags via brute force. I don't know if this is accurate.</p>
+<h3>Known Differences</h3>
+ <p>In many aspects DTCoreText is superior to the Mac version of generating NSAttributedStrings from HTML. These become apparent in the MacUnitTest where the output from both is directly compared. I am summarizing them here for references.</p>
+ <p>In the following "Mac" means the initWithHTML: methods there, "DTCoreText" means DTCoreText's initWithHTML and/or DTHTMLAttributedStringBuilder</p>
+ <ul>
+ <li>Mac does not support the video tag, DTCoreText does.</li>
+ <li>DTCoreText is able to synthesize small caps by putting all characters in upper case and using a second smaller font for lowercase characters.</li>
+ <li>I suspect that Mac makes use of the -webkit-margin-* CSS styles for spacing the paragraphs, DTCoreText only uses the -webkit-margin-bottom and margin-bottom at present.</li>
+ <li>Mac supports CSS following addresses, e.g. "ul ul" to change the list style for stacked lists. DTCoreText does not support that and so list bullets stay the same for multiple levels.</li>
+ </ul>
<h3>Please Help!</h3>
<p>If you find brief test cases where the created <font face="Courier" color="blue">NSAttributedString</font> differs from the version on OSX please send them to us!</p>
View
@@ -59,4 +59,13 @@ CoreText has a problem prior to iOS 5 where it takes around a second on device t
Some combinations of fonts and unusual list types cause an extra space to appear. e.g. 20 px Courier + Circle
+In many aspects DTCoreText is superior to the Mac version of generating NSAttributedStrings from HTML. These become apparent in the MacUnitTest where the output from both is directly compared. I am summarizing them here for references.
+
+In the following "Mac" means the initWithHTML: methods there, "DTCoreText" means DTCoreText's initWithHTML and/or DTHTMLAttributedStringBuilder.
+
+- Mac does not support the video tag, DTCoreText does.
+- DTCoreText is able to synthesize small caps by putting all characters in upper case and using a second smaller font for lowercase characters.
+- I suspect that Mac makes use of the -webkit-margin-* CSS styles for spacing the paragraphs, DTCoreText only uses the -webkit-margin-bottom and margin-bottom at present.
+- Mac supports CSS following addresses, e.g. "ul ul" to change the list style for stacked lists. DTCoreText does not support that and so list bullets stay the same for multiple levels.
+
If you find an issue then you are welcome to fix it and contribute your fix via a GitHub pull request.

0 comments on commit 86b1501

Please sign in to comment.