//得到TextView控件对象 TextView textView = (TextView)findViewById(R.id.custom); //将字体文件保存在assets/fonts/文件夹下,创建Typeface对象 Typeface typeFace = Typeface.createFromAsset(getAssets(), "fonts/HandmadeTypewriter.ttf"); //应用字体 textView.setTypeface(typeFace);