Question

As my question. I want to change my text font in textview to something like the image below.

enter image description here

I don't want to use "bold" or "italic" style in textStyle.

Was it helpful?

Solution

Download any font file from here and put them in fonts folder under assets folder. And use below code for applying font on textview :

Typeface font = Typeface.createFromAsset(this.getAssets(), "fonts/Walkway Bold.ttf");
((TextView) findViewById(R.id.textView13)).setTypeface(font);

OTHER TIPS

Put the font in Assets/fonts directory and then:

TextView tv=(TextView)findViewById(R.id.custom);
Typeface face=Typeface.createFromAsset(getAssets(), "fonts/yourfonts.ttf");
tv.setTypeface(face);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top