Nazariglez / notan

Cross-platform multimedia layer
https://nazariglez.github.io/notan-web/
Apache License 2.0
801 stars 52 forks source link

RTL support #91

Closed yzn-h closed 1 year ago

yzn-h commented 2 years ago

https://user-images.githubusercontent.com/63852512/165938977-89dd4c86-c906-4e45-b27d-422092f08b5c.mp4

It will be great if there is Right to Left support, unfortunately there is so little support for RTL languages in rust there is no good GUI library that support it

yzn-h commented 2 years ago

there is a workaround https://samirdjelal.com/bidirectional-web/ this site revers the letters

Nazariglez commented 2 years ago

Just to be sure, it seems to me that the font is displayed right but the text is not in the right direction, so it should mirrored right? Or there is any other issue with it?

yzn-h commented 2 years ago

no, Arabic is different, depending on the letter position in the word the letter have different shape this is a good explanation: https://youtu.be/T6BWcx1BXkQ?t=441

yzn-h commented 2 years ago

i found a hack, using arabic_reshaper and unicode_reverse it works know but i can't use it with other languages like english in the same string

Nazariglez commented 2 years ago

Notan uses glyph_brush an awesome project to draw font easily and fast, I'm not sure if this issue can be addressed from notan itself, but from glyph_brush. I already open an issue there to ask about it, https://github.com/alexheretic/glyph-brush/issues/150.

I hope that we can do something between all of us.

Nazariglez commented 2 years ago

Marking this as help wanted. To make this happen glyph_brush (our text backend) or fontdue needs to support RTL and then we need to adapt notan to it.

If somebody wants to help to make glyph_brush or fontdue support RTL I'll be glad to integrate the new version on notan. It will be a great help for other frameworks out there because all of us are using these two great libs.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale. Do not hesitate to open a new issue if you need it.