-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
add Hebrew support #3420
base: master
Are you sure you want to change the base?
add Hebrew support #3420
Conversation
I'll review but a better solution would probably be to finalize the work started in #2107. Parsing your sample through the changes proposed in that PR also produce the desired result. |
Hey @bsweeney! Sure, what is there to finalize? Can I help in any way? |
It's been a while since I last looked at 2107, so I don't have any definitive guidance at the moment. I need to review the functionality from the ground up to be sure that specific implementation makes the most sense. That being said there are two things that it needs:
|
I checked out the branch in #2107 and rebased, the solution doesn't seem to work for me. |
That change is working OK for me with your sample. Still, it has a lot of deficiencies and, as I said, more work would be required before I'd consider releasing it. Since that branch is pretty far behind master, I recreated the changes in the rtl branch.
Straight forward, sure, but it's not exactly a robust implementation even discounting that it only supports Hebrew. A big deficiency is that this change performs the work within the context of a single frame, but a string of text can be made of multiple frames, so a more complex example won't render as expected. Try the following:
Additionally, this technique handles one aspect of complex text layout (directionality), but some languages require additional features (e.g., Arabic requires shaping). |
Following the discussion in stack overflow, can you please add this code?
Also opened an issue #3419
Test instruction:
render to pdf the following code:
With this PR, Check you get in the pdf the following result:
Without this PR the letters would appear in the reversed order.