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

Bug: RTL-in-LTR texts aren't drawn correctly even with bidi enabled #2

Open
haashemi opened this issue Apr 16, 2024 · 0 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@haashemi
Copy link
Owner

The writer package highly depends on Harfbuzz, which doesn't support bi-directional texts out of the box (documented here). Thus, the writer has to do the bidi processing itself.

On LTR-in-RTL texts, it just reverses the LTR strings, and everything seems to be fine. (at least with English and numbers)
ltr-in-rtl example

But the main problem comes when you're trying to write an RTL word in LTR text. Not enabling Bidi results in the worst scenario, but enabling Bidi should work as it also reverses it (theorically!), but it doesn't as letters are not attached to each other and Harfbuzz can't choose the right unicodes for each letter. Here's how it draws with and without Bidi enabled:

The text should be: "Testing راست نویسی."

result

@haashemi haashemi added the bug Something isn't working label Apr 16, 2024
@haashemi haashemi added the help wanted Extra attention is needed label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant