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

Direction neutral paragraph support for Fribidi #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

niello
Copy link
Contributor

@niello niello commented Mar 6, 2022

Fix #163.
Only for Fribidi currently. Someone who knows SheenBidi could make the same change there.

@khaledhosny
Copy link
Collaborator

I’m adding a test for this, but I’m not sure this fix is enough. With this fix resolved dir will be RAQM_DIRECTION_DEFAULT but FriBiDi would still treat neutral characters as LTR. The resolved dir is supposed to communicate to the client what direction the text will use when no paragraph direction was explicitly set, so in this case it should be RAQM_DIRECTION_LTR. Resolved direction really needs to be either LTR or RTL, this is how the code always used it internally.

I think we need a different way to communicate to the client that the text is all neutral characters and no paragraph direction can be detected.

@khaledhosny
Copy link
Collaborator

The current code is wrong of course and need to be fixed regardless of this.

@khaledhosny
Copy link
Collaborator

#175 fixes the bad resolved dir, for the use case here, I suggest we add an API to get the natural paragraph direction regardless of the set one.

@niello
Copy link
Contributor Author

niello commented Jun 3, 2022

Sounds good, that API would help

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

Successfully merging this pull request may close these issues.

Incorrect resolved paragraph direction
2 participants