Different fonts for the app gives the attractive look and design which creates the positive image in user mind for usage prospectives.

For example, If you are going to develop the app for magazine or newspaper publisher company then you should choose right font for the app which looking like user reads the magazine or newspaper.

First of all you need to all font files which you gonna use in your app. The fonts may be provided by graphic designer or you will get it from online websites.

Step1: Go to the (project folder)

Step2: Then app>src>main

Step3: Create folder ‘assets>fonts’ into the main folder.

Step4: Put your .ttf file into the fonts folder.

AssetManager am = context.getApplicationContext().getAssets();    typeface = Typeface.createFromAsset(am,
String.format(Locale.US, "fonts/%s", "abc.ttf"));
setTypeface(typeface);

Or you can try like this:

TextView tx = (TextView)findViewById(R.id.textview1);   Typeface custom_font = Typeface.createFromAsset(getAssets(),  "fonts/abc.ttf");   tx.setTypeface(custom_font);

--

--

Mr.Javed Multani

Software Engineer | Certified ScrumMaster® (CSM) | UX Researcher | Youtuber | Tech Writer