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

Try flipping RTL text (#472) #705

Closed
wants to merge 1 commit into from
Closed

Try flipping RTL text (#472) #705

wants to merge 1 commit into from

Conversation

mapmeld
Copy link

@mapmeld mapmeld commented Aug 18, 2014

I was interested in right-to-left labels for my project, so I tried out a couple of things. This code essentially 'flips' any RTL text and multi-word phrases.

It unfortunately only works on bidirectional text if there is a space between LTR and RTL words, so Casablanca shows up wrong. It's tough for me to know if the rest of the Arabic labels are written properly, but I might be breaking connections between letters by flipping it like this.

screen shot 2014-08-17 at 10 26 13 pm

@mikemorris
Copy link
Contributor

So, even after flipping the Arabic labels will still not be rendered properly, because complex text shaping has not yet been implemented.

For displaying RTL/LTR text properly, we should use the Unicode Bidi Algorithm.

Twitter ported this and some other bits or i18n logic from ICU, which might be a good place to start.

Refs #472

@jfirebaugh
Copy link
Contributor

@mapmeld, thanks for the contribution. I think we are going to wait until we have time to implement a more complete solution along the lines of what @mikemorris suggests. Of course if you want to dive into that you'd be very welcome!

@jfirebaugh jfirebaugh closed this Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants