This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Depending on the version, | |
there are a few possibilities for the | |
stock typeface. A couple being | |
SANS_SERIF, SERIF, and MONOSPACE. Others | |
are introduced in later versions **/ | |
Typeface font=Typeface.SANS_SERIF; /**STOCK FONTS**/ | |
//--OR--// | |
Typeface font = Typeface.createFromAsset(getAssets(),"fonts/customfont.ttf"); | |
/** THIS WOULD BE CALLED FROM A FONTS FOLDER YOU CREATED IN YOUR ASSETS | |
AND THEN INSERTED YOUR TTF FILE IN IT.**/ | |
// Then you can simply set the typeface in each textView, paint, or button. // | |
textview.setTypeface(font); | |
As usual thanks for reading and please check out my newest photo editing app for Android called Perspective!!!