Title: how to get android default font list programmatically?
Tags: android;android-fonts
Question: I am trying to create app which provide text formatting (like font style , font size , font color). So I want default fonts provided by android as a list to be shown in drop-down. Selecting font from drop-down will change the Text dynamically.
Can anyone help , how can I achieve this either via XML or programmatically ?

See the image how it must look like



Comment: For ordinary widgets, there are only three options: serif, sans-serif, and monospace. Fonts are not part of the Android SDK.

Comment: That's your job. Package some in your app. Or, download some from the Internet. Pay attention to the font licensing terms, of course.

Comment: @Pallavi its making a one comman class for the set different type of font and in activity to set after bind text view.

Comment: @Pallavi yes this for the different different font type.

Comment: @Pallavi how many font size you want ??

Comment: Ok. So how I can get more fonts?

Comment: @HardikParmar I need to put .ttf files in asset folder, Correct?

Comment: @HardikParmar , but how many .ttf files I will download?
And also it will increase the size of the package. So is there any better way.

Comment: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/111517/discussion-between-pallavi-and-hardik-parmar).


Here is another answer: There are only three system wide fonts in Android SDK.
```

normal

serif

monospace


```
More info : click here

Comment for this answer: need to add your app itself
Comment for this answer: Ok. So how I can get more fonts?

Here is another answer: font list is saved in ```Typeface``` class as a static field ```Map<Stirng, Typeface&gt; sSystemFontMap```. you just need to get this field. See my answer here.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 9, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:05/09/16', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<android><android-fonts>', 'Title': 'how to get android default font list programmatically?', 'ViewCount': 3507, 'id': 37115019, 'user_AboutMe': '<p>Software Engineer</p>\n', 'user_AccountId': 7611705.0, 'user_DisplayName': 'Pallavi', 'user_Reputation': 652.0, 'user_Views': 228.0, 'user_id': 5772348.0}}