Urdu font in textview

╄→гoц情女王★ 提交于 2019-11-29 07:13:40

Asaalam-o-alakum bibi Tahira You can downlaod urdu Font from this link,i have tested it.

Thanks

Vishal

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.

  1. Copy the sample URDU text in ms-word. Check the font of it.

  2. Copy the font in assets.

  3. While setting the textview text read it as UTF-8
  4. Apply the font from 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("یہ انگریزی نہیں");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!