fonts - Take different typeface from a ttc Android -


in application must use custom type of font in file .ttc . file conteins different type of typeface (normal, bold, ...). code:

textdetails.settypeface(typeface.createfromasset(getassets(), "fonts/font.ttc")); 

i can take 1 type of typeface. there method take typeface?

you can set style access bold , italic typefaces:
http://developer.android.com/reference/android/widget/textview.html#settypeface(android.graphics.typeface, int)

try this:

textdetails.settypeface(typeface.createfromasset(getassets(), "fonts/font.ttc"), typeface.bold); 

Comments