Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install custom font in android device

Tags:

android

I want to install custom font which is .ttf file in android device when my application start. Actually I need to install Burmese font in my android device when I run my application. Is it possible? If yes, then how? I don't need typeface. I want to install in system.

like image 447
kalpana c Avatar asked Apr 07 '12 04:04

kalpana c


People also ask

Where do I put TTF files on Android?

Put your Font File in Assest Folder, and in use Bellow Code for access. Show activity on this post. app/src/main/assets/your ttf file.


3 Answers

See here @CommonsWare answer, You cannot add fonts to an existing device, except as part of a custom firmware build, or possibly by rooting the device.

but you can add fonts in your appliction. like:

 TextView txtvw=(TextView)findViewById(R.id.textviewname);

 Typeface typface=Typeface.createFromAsset(getAssets(),"fonts/burmese.ttf");

  txtvw.setTypeface(typface);

Note: put your font in assets/fonts dir in project

OR if your device is rooted then see this tuts for installing Custom Fonts on Your Android Device

like image 155
ρяσѕρєя K Avatar answered Oct 18 '22 23:10

ρяσѕρєя K


you need to be on root of the device

for that you can use this application EasyRoot.apk

Download and install ES File Explorer (https://market.android.com/details?id=com.estrongs.android.pop)

After that you need to enable root explorer. More info can obtained from this link

http://chetangole.com/blog/2011/08/enabling-installing-hindi-marathi-unicode-fonts-on-android-mobile/

save fonts on your device’s /system/font folder

More info can obtained from this link

http://chetangole.com/blog/2011/08/enabling-installing-hindi-marathi-unicode-fonts-on-android-mobile/

like image 22
UVM Avatar answered Oct 19 '22 00:10

UVM


if you have custom font then use following code:::

TextView tv=(TextView)findViewById(R.id.custom);
Typeface face=Typeface.createFromAsset(getAssets(),"fonts/Verdana.ttf");
tv.setTypeface(face);

also place your font in assets/fonts folder

like image 24
Shankar Agarwal Avatar answered Oct 18 '22 22:10

Shankar Agarwal