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

Text layout should refer to character indices, not byte offsets #215

Closed
burg opened this issue Nov 19, 2012 · 1 comment
Closed

Text layout should refer to character indices, not byte offsets #215

burg opened this issue Nov 19, 2012 · 1 comment

Comments

@burg
Copy link

@burg burg commented Nov 19, 2012

In general, all text layout should be in terms of character offsets, and refer to/save data in glyph storage for determining ligatures, clusters, and line breaking. Line breaking is currently done on whitespaces in the original string (~[u8]), which causes inter-word breaks when there is not a 1-to-1 correspondence between bytes, glyphs, and/or characters.

This should fix bad line breaking, invalid indexing into the glyph store, and unblock rendering of multi-byte characters. A Japanese test case is src/tests/mojira.html.

@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented May 20, 2016

This has been fixed for a while now.

@mbrubeck mbrubeck closed this May 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.