Asim Krishna Das Asim Krishna Das - 1 year ago 126
Android Question

How to use custom font in Android Studio

I was trying to use custom font in Android Studio as we did in Eclipse. But unfortunately could not figure out where to put the 'assets' folder!

Answer Source

Here is the few steps to solve it:

  1. Go to the (project folder)
  2. Then app>src>main
  3. Create folder 'assets>fonts' into the main folder.
  4. Put your 'abc.ttf' into the fonts folder.

        AssetManager am = context.getApplicationContext().getAssets();
        typeface = Typeface.createFromAsset(am,
                String.format(Locale.US, "fonts/%s", "abc.ttf"));

    or try this way:

       TextView tx = (TextView)findViewById(;
       Typeface custom_font = Typeface.createFromAsset(getAssets(),  "fonts/abc.ttf");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download