Setting the font in your Android application
To set the font that you want to use in your Android application programmatically, you have to package your font (i.e. “Calibri.TTF”) with your application. Under MySmugProject/resources, create another folder named: “fonts”. Effectively, it should look like – “/MySmugProject/resources/fonts/Calibri.TTF”.
Now in your code append the following:
Typeface calibri = Typeface.createFromAsset(getAssets(), “fonts/Calibri.ttf”);
TextView fname = new TextView(this);
And we’re done!