Possible Duplicate:
Is it possible to set font for entire Application?
我需要为整个应用程序设置自定义字体(.ttf 格式),我该怎么做? 如果可能,来自 Manifest 或 XML 将是最佳选择
最佳答案
2014 年 9 月编辑:
对于仍然看到这个旧的可怕答案的人来说,真正好的答案就在这里:
https://stackoverflow.com/a/16883281/1154026
旧:
您最好的选择是:
所以
TextView text = (TextView) findViewById(R.id.custom_font);
Typeface font = Typeface.createFromAsset(getAssets(), "yourfont.ttf");
text.setTypeface(font);
您的 .ttf 位于“assets”文件夹的根目录中。
关于Android - 如何为整个应用设置自定义字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12281761/