1、下载TTF字体文件
2、在目录assets中新建fonts目录,将我们需要使用的ttf字体文件复制进去
TextView mTextView = (TextView) findViewById(R.id.mTextView);
Typeface typeFace = Typeface.createFromAsset(getAssets(), "fonts/font.TTF");
mTextView.setTypeface(typeFace);
mTextView.setText("你个呵呵,字体改了没???”);
Android使用外部字体
最新推荐文章于 2022-04-20 19:07:58 发布