4

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.

Community
  • 1
  • 1
newday
  • 3,842
  • 10
  • 54
  • 79

3 Answers3

3

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.

iTech
  • 18,192
  • 4
  • 57
  • 80
  • 1
    I use Farsi class to manipulate text. http://stackoverflow.com/questions/7962704/how-to-support-arabic-text-in-android/7962813#7962813 – newday Dec 29 '12 at 02:37
  • Actually there are some slight changes even after using the class. Such as fullstop is ot correctly positioned. If I dont use this class, it will not start text from right handside for older android version such as 2.2 – newday Dec 29 '12 at 02:42
  • The picture you sent is showing disconnected letters, so if this was the result of the Farsi class, it means it does not work properly. I noticed that it only connects letter when it does not have diacritic "tashkeel". Regarding the positioning of punctuation e.g. fullstop when it is mixed with Arabic, the library need to be aware of Bidi rules to get it correct. I would suggest try the other class to manipulate the text. – iTech Dec 29 '12 at 04:08
  • I am trying your mentioned class. Feel it is better. but I want to check more. I will get back to you when I finsh it. thanks for your help – newday Dec 29 '12 at 04:48
1

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

Mahdi Giveie
  • 630
  • 1
  • 8
  • 25
-1

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("ادخل اسمك"));
letiagoalves
  • 11,224
  • 4
  • 40
  • 66
droid5432
  • 21
  • 1
  • 1
  • 8