java - How to integrate a special font (.ttf) in an Android application? -


i want add file .ttf able customize font of textview in application.

i wonder how exploited?

i download file on dafont.

thank in advance help!

first, copy font /assets folder in project, set typeface of textview, can following:

typeface myfont = typeface.createfromasset(getassets(), "dafont.ttf"); mytextview.settypeface(myfont); 

edit: corrected directory


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -