mTypeface = Typeface.createFromAsset(context.getAssets(),
"fonts/GOTHIC.TTF");
在assets文件夹是新建一个fonts文件 夹,并在里面放入ttf格式的字体文件,通过上面的语句得到字体
通过setTypeface()方法设置字体。
mTextView.setTypeface(mTypeface);
mTypeface = Typeface.createFromAsset(context.getAssets(),
"fonts/GOTHIC.TTF");
通过setTypeface()方法设置字体。
mTextView.setTypeface(mTypeface);