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("یہ انگریزی نہیں");
Asaalam-o-alakum Bibi Tahira You can downlaod the urdu font at this link, I tested it.
thanks
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.
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("یہ انگریزی نہیں");