Question

I am designing an application based on android platform.

I want to show Right To Left strings in my application. I have included a TTF font into asset folder and my output is affected based on this font.

In Arabic or Persian languages characters Can stick together but in output (display), these are separated. for example, I want to show "السلام" but in display it shows: "ا ل س ل ا م".

what should I do?

Was it helpful?

Solution

Your problem probably comes form the kerning attribute. There is already a question that has been answered about this and unfortunately there is no easy way to adjust it.

How to adjust text kerning in Android TextView?

OTHER TIPS

You can also try using a SpanningString but you would need to parse it and change the character spacing for each of the words

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top