i have set urdu in textview and apply urdu typeface but is only showing word by word like ب ہ ن
here is 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 urdu Font from this link,i have tested it.
Thanks
For Regional languages you need to read them as UTF-8 and then set the font.
I have followed the below steps and working fine.
Copy the sample URDU text in ms-word. Check the font of it.
Copy the font in 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("یہ انگریزی نہیں");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With