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

Does allsorts shape text in logical or visual order? #70

Closed
LoganDark opened this issue Jun 12, 2022 · 2 comments
Closed

Does allsorts shape text in logical or visual order? #70

LoganDark opened this issue Jun 12, 2022 · 2 comments

Comments

@LoganDark
Copy link
Contributor

LoganDark commented Jun 12, 2022

So in my prior discussion I asked for some more details on how to compose allsorts into a more complete layout engine. In there was some stuff like:

  • Split text into runs of the same direction, script, font etc
  • Shape each run individually then compose them later

My question is, does allsorts shape text in logical or visual order? If I'm shaping a run of Arabic text, do I need to have unicode-bidi reverse the codepoints before passing them to Font::shape, or is TextDirection::RightToLeft enough?

P.S. This is an issue because it should be documented

@wezm
Copy link
Contributor

wezm commented Jun 14, 2022

Had to double check this but confirming that shaping is done in logical order so there is no need to reverse the input text when using TextDirection::RightToLeft.

P.S. This is an issue because it should be documented

I'll keep it open until the docs have been updated.

@wezm
Copy link
Contributor

wezm commented Jun 14, 2022

Added a note to the docs in 680c401

@wezm wezm closed this as completed Jun 14, 2022
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