Journal for Developers

4 Steps to Add Custom Font in Android App

Android Custom Fonts
0 80

Notice: Undefined index: rate in /home/content/p3pnexwpnas11_data03/84/3795084/html/wp-content/themes/publisher/includes/functions.php on line 5360
1 min read

Android gives you the flexibility to easily customize the fonts that you want to use for your Applications Text.

All you have to do is download the font file from the internet and then follow these 4 simple steps.

[quads id=1]


Create an “assets” folder directly under your project’s “src/main” folder.

Android Custom Font Assets Folder

[quads id=2]


Copy the “font-name.ttf” file in this directory.


Instantiate the Typeface object using createFromAsset() method.

Typeface typeface = Typeface.createFromAsset(getAssets(), "Slim-Joe.ttf");

NOTE: If you are using fragments in your project, then you have to instantiate the Typeface object in onAttach() method of the fragment. This is done due to the fragment lifecycle, as there is a short period of time after a fragment is created but before it is attached to a host activity.


The last very important step, once all the above 3 steps are done, all you need to do is take the references of TextView objects and then specify the setTypeFace() method passing in the typeface object as the parameter.

TextView textView = (TextView) findViewById(;

[quads id=3]

Subscribe to our Journal

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!