Skip to content
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

Implement NSLineBreakByWordWrapping #328

Closed
Dermiste opened this issue Mar 5, 2013 · 10 comments
Closed

Implement NSLineBreakByWordWrapping #328

Dermiste opened this issue Mar 5, 2013 · 10 comments
Labels

Comments

@Dermiste
Copy link

Dermiste commented Mar 5, 2013

Hello,

I've been trying to use NSLineBreakByWordWrapping on a DTAttributedLabel. It does work, but does not seem to use the truncationString I'm passing on (in this case "...").

@odrobnik
Copy link
Collaborator

odrobnik commented Mar 5, 2013

At present only start, middle and end trunction is implemented.

@Dermiste
Copy link
Author

Dermiste commented Mar 5, 2013

All right, where should I implement this? So you can then pull it in the source code

@odrobnik
Copy link
Collaborator

odrobnik commented Mar 5, 2013

In DTCoreTextLayoutFrame, in _buildLinesWithTypesetter, line 245ff

On Mar 5, 2013, at 12:57 PM, Dermiste notifications@github.com wrote:

All right, where should I implement this? So you can then pull it in the source code


Reply to this email directly or view it on GitHub.

@Dermiste
Copy link
Author

Dermiste commented Mar 5, 2013

In line 502 there is:
if ([typesetLines count] && self.lineBreakMode)

Which prevents from going in the "_buildLinesWithTypesetter" function as self.lineBreakMode = 0 (NSLineBreakByWordWrapping = 0).
Is that on purpose?

@odrobnik
Copy link
Collaborator

odrobnik commented Mar 5, 2013

@Dermiste Well, isn't word wrapping the default and not truncating?

@Dermiste
Copy link
Author

Dermiste commented Mar 5, 2013

All right, I think there was a mistake in my understanding of the constant :)
Anyway, the truncatedString still does not add up at the end of the text when it's truncated

@odrobnik
Copy link
Collaborator

odrobnik commented Mar 5, 2013

Please fix whatever problem you see.

@odrobnik
Copy link
Collaborator

odrobnik commented Mar 5, 2013

@Dermiste so what does that mean for this issue? Can we close it? Or is there some problem that you like to fix?

@Dermiste
Copy link
Author

Dermiste commented Mar 5, 2013

Not sure yet, we are trying a few solution over here, I keep you posted

@odrobnik
Copy link
Collaborator

Since there has not being any activity on this issue in several months we are closing it for now. If you are interested in providing a fix or solution you are encouraged to provide a pull request.

Please read the release notes for the latest 1.6.20 release. If you still require assistance, you can hire me to work on your issues for a reasonable fee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants