New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kanji in string appears to add extra leading to first line of attributed text #372
Comments
Try setting noLeadingOnFirstLine property of the layout frame to YES in DTAttributedLabel. |
It doesn't have an effect either way. |
A better test case illustrating the difference in layout (iOS6) - this can be used in a basic single view Xcode project:
|
OK, found the problem. The noLeadingOnFirstLine mechanism is broken - because of the way layoutFrame is handled it is always false in DTCoreTextLayoutFrame's _buildLinesWithTypesetter method. |
@aeberbach can you fix it? |
I think so. Will do a pull request when ready. On 10/04/2013, at 9:01 PM, Oliver Drobnik notifications@github.com wrote:
|
Thanks for this great library - it's almost perfect!
In the code below dtTitleLabel is a DTAttributedLabel that is set by some content from the web. Sometimes the content can contain characters other than the western alphabet, which must be supported. The issue is that the first line appears to have an abnormally large amount of leading above it when the line contains those characters. The difference can be observed by uncommenting the alternate value for titleLabelHTMLString.
This is a big deal because it upsets the layout of this label within a table view cell that contains several elements, and the whitespace really sticks out.
If you don't know what might be causing this do you have any pointers on where to look?
The text was updated successfully, but these errors were encountered: