Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display malayalam text in my app [duplicate]

Tags:

android

Possible Duplicate:
malayalam font in android?

I want to display Malayalam text in my app, is it possible? I have tried using typeface from gont file of malayalam language. But it doesn't work. Is there any other way to do it. Please give me some suggestions,

Thanks in advance.

like image 897
bindal Avatar asked May 17 '12 13:05

bindal


1 Answers

Get your required Malayalam font into your assets folder of your application. And, follow the below steps -

  • Just use this font to your TextView with Typeface like below code

Typeface typeFace = Typeface.createFromAsset(getAssets(),"malyalam.fnt");

  • and then add it to your textview like below

textView.setTypeFace(typeFace);

Get your malayalam fonts here -

Malayalam Fonts and Fonts for Malayalam

Hope this helps you.

Update

I just tested below code with one malayalam font. Its working fine. Try with that -

TextView t = (TextView)findViewById(R.id.textView1);

t.setText("മലയാളം");

Typeface typeFace = Typeface.createFromAsset(getAssets(),"AnjaliOldLipi.ttf");

t.setTypeface(typeFace);
like image 88
Praveenkumar Avatar answered Sep 30 '22 18:09

Praveenkumar