开发者

show of Right to Left font

开发者 https://www.devze.com 2023-01-27 09:42 出处:网络
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 bas开发者_如何学

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 bas开发者_如何学编程ed 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?


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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号