EDIT . In some experiments, especially with the Galaxy S3, which allows the user to change the font, this is what I found:
- Using
Typeface.create(Typeface.SANS_SERIF, Typeface.NORMAL)will return this CUSTOM font, not the default sans-serif font (i.e. Roboto) - Use
Typeface.create("sans-serif", Typeface.NORMAL)(or BOLD) instead , and it will return Roboto regardless of the font customization. From the list below you can actually use "helvetica", "tahoma", "verdana" or "arial" above instead of "sans-serif" with the same result.
I found a document called system_fonts.xmlwhich seems to confirm that Roboto will be used for any link to Typeface.SANS_SERIFin the SDK directory under:
platform > android-14 > data >
<familyset>
<family>
<nameset>
<name>sans-serif</name>
<name>arial</name>
<name>helvetica</name>
<name>tahoma</name>
<name>verdana</name>
</nameset>
<fileset>
<file>Roboto-Regular.ttf</file>
<file>Roboto-Bold.ttf</file>
<file>Roboto-Italic.ttf</file>
<file>Roboto-BoldItalic.ttf</file>
</fileset>
</family>
fallback_fonts.xml, , , , - Roboto sans-serif, aria, helvetica, tahoma verdana, , Roboto , Typeface.create(Typeface.SANS_SERIF, Typeface.NORMAL).
, , , OEM system_fonts.xml. , .