I designed an application UI for an android application and used Arial font inside the app for all the text. Now the developer used the default fonts of Android. I asked him to overwrite the default fonts with Arial. He placed the Arial.ttf file inside the font directory and the problem was solved. BUT now, I downloaded new font app on my android handset which is used to change the default font of android from the settings menu. When I change that font, the Arial font in my specific application changes too. I am looking for a solution though which I can use my custom defined font in my developer application and even if Android Font settings are changed, my app is not effected with it.

Member Avatar for highondota

you will need to put the font file in your Android App's "assets" folder and then set it to each text view you have...using:

TextView txt = (TextView) findViewById(R.id.custom_font);
Typeface font = Typeface.createFromAsset(getAssets(), "MyFont.ttf");
txt.setTypeface(font);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.