How To Get Hindi Fonts In Android..?
I'm new to Android field . I have followed the procedure of getting Hindi fonts on emulator but still Hindi characters are appearing in square boxes. Please help me how to proceed.
Solution 1:
Set The Hindi Font on TextView in Android
TextViewt=newTextView(this);
TypefaceHindi= Typeface.createFromAsset(getAssets(), "fonts/mangle.ttf");
t.setTypeface(Hindi);
t.setText("Naveen Tamrakar");
Solution 2:
Solution 3:
Create a folder in assets as "fonts". Place your .ttf file of font in that.
then try the code as :
TypefacefontHindi= Typeface.createFromAsset(getAssets(), "fonts/font.ttf");
tv.setTypeface(fontHindi);
It works for me. Hope it works for you too.
Solution 4:
You can download hindi fonts from http://hindi-fonts.com and copy it in /system/font directory of your phone. The font will be installed.
Solution 5:
First of all download hindi font, d the OTF/TTF file you get, save that in asset folder, eclipse has already the folder, if you are using android studio, then make a new folder in project/app/src/main
.
Then in java file, suppose you have to apply your font on TextView t1
, use the code..
Typeface mytypeface= Typeface.createFromAsset(getAssets(),"font-file_name.TTF");
t1.setTypeface(mytypeface);
Post a Comment for "How To Get Hindi Fonts In Android..?"