9fans / plan9port

Plan 9 from User Space
https://9fans.github.io/plan9port/
Other
1.62k stars 320 forks source link

punctuation is wrong in right to left written text like hebrew and arabic #551

Open simonfelding opened 2 years ago

simonfelding commented 2 years ago

Hey! From the screenshots of UTF-8 capabilities, it's a bit jarring that the full stop is all the way to the right when the sentence ends on the left side :) I realize this is probably quite unimportant.

in left to right text, it would look like this: ".i am eating glass and it doesn't hurt"

bhuntsman commented 2 years ago

Can you attach a screenshot, or document steps to reproduce?

simonfelding commented 2 years ago

Sure.

https://9fans.github.io/plan9port/screenshots/acme.png

If you look at Hebrew, Arabic and Yiddish, you'll see that the sentences have a period at the rightmost position of the sentences, but it should be on the leftmost position as they are right-to-left scripts. Strangely, it looks like it's not an issue for farsi on that picture.

To make it really nice, right to left scripts should also start from the right side of the page. Right to left languages are such a mess 🙂 If you set your keyboard to Hebrew on Linux/mac/windows you'll see what I mean. I understand this isn't a priority, just thought I'd mention it since it hasn't been mentioned before.

bhuntsman commented 2 years ago

Is that simply an issue with the screenshot or sample file itself, or does punctuation get inserted incorrectly when entering text using a right-to-left keyboard setting?

jxy commented 2 years ago

No, libdraw doesn't know R-L at all.