newday
newday

Reputation: 3878

Arabic fonts are not displayed well in android

I have seen lot of questions regarding this issue.I think from myside I have tried everything to make it works and it works but not as coustomer expects. let me explain everything. here is the compatibility of my android application

 <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

this means minimum version is 2.2. Arabi is supported in 2.2 and I have use Farsi class. How to support Arabic text in Android?

Apartfrom that I have used arabic fonts DroidNaskhBold.ttf

Herewith I have attached a screen shot of arabic words. http://tinypic.com/r/e8u1zd/6 I dont know Arabic. But when I check letter by letter I noticed that after adding above font some letters are replaced by some different letters.

Other font I used don't show arabic words properly. I mean they are not show together accumelated.I can not keep hope on other fonts.

Is there way to solve this issue? If there is a good font to render Arabic text properly, I am ready to buy it because I think this is the only way to have a hope on this.

Upvotes: 4

Views: 8959

Answers (3)

droid5432
droid5432

Reputation: 21

Download Farsi class and add it in your project. Then if you want to write any arabic text on a button do:

Typeface tfbtn = Farsi.GetFarsiFont(this);

Button ed_companies_username=(Button)findViewById(R.id.add_companies_send);

ed_companies_username.setTypeface(tfbtn);

ed_companies_username.setHint(Farsi.Convert("ادخل اسمك"));

Upvotes: -1

iTech
iTech

Reputation: 18440

I do not see any problem in this font, it does not seem to change any letter, just you need to use library to connect the letters such as Better Arabic Reshaper

you can find different Arabic fonts here and here, but again I believe the problem is not in the font, but in the library you are using to connect the letters.

Upvotes: 3

Mahdi Giveie
Mahdi Giveie

Reputation: 640

You can use API 17 , Android 4.2 which is Ok with RTL languages

Upvotes: 1

Related Questions