Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the Font styles and face in Android?

Tags:

android

fonts

I want to change the font face and styles in android. How to do this? Am using emulator. Is this possible to change in emulator. Is there any permissions available to do that. Thanks in Advance.

like image 572
Praveenkumar Avatar asked Sep 22 '11 10:09

Praveenkumar


People also ask

How do I change my font style on Android?

Open Settings. Tap Display. Tap Font and screen zoom. Select your choice of Font Style and you're done.

How do you change the font face?

The font tag is having three attributes called size, color, and face to customize your fonts. To change any of the font attributes at any time within your webpage, simply use the <font> tag. The text that follows will remain changed until you close with the </font> tag.

How do I change the font style on my mobile phone?

Go to the Settings app > Display > Font size and font style. Now tap the 'Font style' option. Now you can choose from a wide variety of font styles, or download additional fonts from the Galaxy Store.


2 Answers

in android only five fonttype-face

TypeFace

Typeface.DEFAULT
Typeface.MONOSPACE
Typeface.SANS_SERIF
Typeface.DEFAULT_BOLD
Typeface.SERIF

and font-type

Typeface.NORMAL
Typeface.BOLD
Typeface.BOLD_ITALIC
Typeface.ITALIC

you can use like as

textView.setTypeface(Typeface.DEFAULT, Typeface.BOLD);

and other way is you can download any .ttf file and put it in asset folder and use like as this

Typeface type=Typeface.createFromAsset(context.getAssets(),
        "DroidSansMono.ttf");
textView.setTypeface(type, null);
like image 147
Niranj Patel Avatar answered Oct 24 '22 00:10

Niranj Patel


You can change the font style and font face in your XML files. For example if you want to change your Button's style and face. Choose your button in xml and follow the below methods :

Button -> Right Click -> Properties -> Typeface and style

Hope this will help you.

like image 44
sudhakar Avatar answered Oct 24 '22 00:10

sudhakar