Coding Tips: How to Use Custom Font in Android

If you are new to Android development and wondering how to use custom font, here is a quick tip to use custom font in your Android application. Using custom font in Android is pretty simple, just copy the custom font files  and load them from your application.

  • Copy your custom font files into assets directory. The font files can be a True Type (ttf) font or Open Type font (.otf)custom font android
  • From your application code, load the font using Typeface.createFromAsset(getAssets(), “fontname.otf”) method
    Typeface font = Typeface.createFromAsset(getAssets(), "helvetica.otf");
  • To use the loaded custom font, use setTypeface method on the widget you want to apply, for example, to use it on TextView, use textViewObj.setTypeface(customfont).
    TextView myTextView = (TextView) findViewById(;
facebooktwittergoogle_plusredditpinterestlinkedinmailby feather


Leave a Reply

Your email address will not be published. Required fields are marked *