Java tutorial
//package com.java2s; /* * Licensed Materials - Property of IBM * Copyright IBM Corporation 2014, 2015. All Rights Reserved. */ import android.content.Context; import android.graphics.Typeface; public class Main { /** * * @param context * @return The custom Typeface for RobotoSlab-Regular.ttf */ public static Typeface robotoRegular(Context context) { return Typeface.createFromAsset(context.getAssets(), "fonts/RobotoSlab-Regular.ttf"); } }