-
Notifications
You must be signed in to change notification settings - Fork 237
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
Harfbuzz Integration #234
Comments
This probably belongs to artist which is planned to be the backend implementation. Artist is planned to use Skia (which has a lot of own dependencies, Harfbuzz included IIRC) which supports RTL. |
No, this belongs here. Elements develop and main branches do not use Harfbuzz and is the reason for this issue. Some corrections:
The correct answer: Please try the artist_port branch. It is the future of Elements. |
Thanks a lot for the clarification. I tried the artist_port branch but the textedit example crashes when a non ASCII character is entered. |
The artist_port is very new and surely needs to be tested more before it goes to develop and then master:
|
@Chashm-e-Afreen , do you have an update on this? I tried pasting russian, but I do not get the crash you mentioned: |
OK, please try the updated code (I pushed to the artist_branch). I fixed some code probably related to the issue you mentioned. I'd appreciate it if you can give it a try and stress test the example well. |
Sorry for not being able to reply. I'll give it a test and update you soon. |
Still no luck, entering an RTL unicode point causes the application to crash, copy pasting works but RTL fonts do not work particularly well. For LTR languages it's all good I guess. |
Could you give me a stack trace of the crash? Would you be willing to work with me on making this work? I'll need to figure out a way to test this myself, install RTL fonts and input methods, etc. For example, we can probably feed the input programmatically (instead of typing) and make a test out of it. I should start making tests and this can be a good start. If you are willing to work on me to make this work, we can discuss in the Discord channel |
Yeah, I'll be glad to help. The segmentation fault occurs in the
function. I'll try my best to fix it. |
Figured out where the problem is, the loop variable gets incremented twice and hence never becomes equal to the last character. This leads to an infinite loop. The decode_utf8 automaton might be at fault here. |
Hmm... OK, can you give me an input string I can try? In any case, I think the text element and layout engine needs a lot of work because they all assume LTR, although the harfbuzz engine itself can do RTL, and so is Skia, I assume. So this is doable, and I'd like to make it work. |
Sure, here's a simple RTL string حرف باز You can get an RTL font from here |
Hi!
Hope you're doing well. Just recently came across this wonderful GUI library. The issue at hand is that RTL languages currently do not render properly. Integrating Harfbuzz should solve the problem.
The text was updated successfully, but these errors were encountered: