27
votes

What font file types does Android support (for use with Typeface.createFromAsset, for instance)?

I can't seem to find a list in the documentation. I can see TTF gets mentioned in some tutorials and someone on here hinted that OTF is also supported now but is there a comprehensive list that shows what font file types are supported by the different API levels?

Many thanks.

EDIT: to be specific: can someone show me where it mentions font compatibility and supported font types in the docs - if there is anything there?

2
Some things still aren't officially documented except in the source code, which is (mostly) open. My guess is that this falls under that category, but it's difficult for me to prove that something doesn't exist :) - Eben Geer

2 Answers

23
votes

http://www.androidguys.com/2008/08/18/fun-with-fonts/

Use external fonts in android

TTF is always been supported. OTF was later added at least in 1.6 and later, but partially. Some TTF fonts Android doesn't like.

7
votes

Android docs doesn't specify the fonts that it supports.When Android dislikes a custom font, rather than raising an Exception, it seems to substitute Droid Sans ("sans").