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

Attributed label gets truncated when using non-Latin scripts and AutoLayout #12

Open
runnersaw opened this issue Apr 20, 2018 · 1 comment

Comments

@runnersaw
Copy link

When using non-Latin scripts (such as Arabic or Chinese), NIAttributedLabel's text can be truncated when using AutoLayout to let the label size itself.

To reproduce, constrain an NIAttributedLabel instance so that it's width is specified (i.e. to the left and right of the screen), and so that its height is unspecified (i.e. only to the top of the screen). When the NIAttributedLabel's text is Arabic, the text will be truncated.

@natewilliford
Copy link

Also seen this with Latin script for longer strings. Certain screen sizes show as truncated. Seems to be that NIAttributedLabel renders slightly larger than a UILabel with the same font. I wonder if it's being measured as a UILabel, but once rendered as a NIAttributedLabel it won't fit.

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

No branches or pull requests

2 participants