0

The default font in a TexView renders Arabic horribly.

Is there a way I can set TextView to a style that will render Arabic nicely, perhaps using android:textAppearance?

Ian Vink
  • 66,960
  • 104
  • 341
  • 555
  • see http://stackoverflow.com/questions/7962704/how-to-support-arabic-text-in-android/7962813#7962813 – Rasman May 14 '12 at 04:09
  • I think these links will help you....[link 1][1] [link 2][2] [1]: http://stackoverflow.com/questions/5337680/using-androidtextappearance-on-textview-edittext-fails-but-style-works [2]: http://stackoverflow.com/questions/8245259/android-button-textappearance Thanks.... – user4232 May 14 '12 at 04:14

1 Answers1

1

Create a typeface and set it to all components that display text (TextView, EditText, Button, ...). To do this:

1- Copy your font file into your assets folder

2- In your Activity:

someTypeFace = Typeface.createFromAsset(getAssets(), "fonts/someFont.ttf");

3- Everywhere you have a View object:

someTextView = (TextView) findViewById(R.id.some_text_view);
someTextView.setTypeface(someTypeFace);    
Ali Behzadian Nejad
  • 8,804
  • 8
  • 56
  • 106