Urdu font in text form

enter image description here

I set urdu to textview and applied urdu font , but only showing word by word like ب ہ ن

here is the code:

 Typeface tf1 = Typeface.createFromAsset(this.getAssets(), "Urdu.ttf"); TextView textView = (TextView)findViewById(R.id.textView1); textView.setTypeface(tf1); textView.setText("یہ انگریزی نہیں"); 
+6
source share
3 answers

Asaalam-o-alakum Bibi Tahira You can downlaod the urdu font at this link, I tested it.

thanks

+5
source

For regional languages, you need to read them as UTF-8, and then install the font.

I followed these steps and worked fine.

  • Copy URDU sample to ms-word. Check the font.

  • Copy the font into assets.

  • When customizing text text, read it as UTF-8
  • Apply font from Assets.
+2
source
  Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/burnstown_dam.otf"); TextView tv = (TextView) findViewById(R.id.CustomFontText); tv.setTypeface(tf); Typeface tf1 = Typeface.createFromAsset(this.getAssets(), "fonts/Jameel Noori Nastaleeq Urdu.ttf""); TextView textView = (TextView)findViewById(R.id.CustomFontText); textView.setTypeface(tf1); textView.setText("یہ انگریزی نہیں"); 
+1
source

All Articles