mapbox/mapbox-gl-js — pull request #705 by mapmeld (2014-08-18 02:40:31+00:00)
Title: Try flipping RTL text (#472)

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](https://cloud.githubusercontent.com/assets/643918/3946912/1905d148-267f-11e4-8382-bb65bda9cf5d.png)