我正在开发一个应用程序,需要使用Helvetica Neue字体来显示文本,但问题是我不知道如何在Android中使用Helvetica字体。我的问题是,Android是否支持Helvetica字体,如果是的话,如何使用这种字体?因为我在Windows首选项-常规-外观-颜色和字体中找不到Helvetica字体。非常感谢您的帮助。
place the TTF file in the ./assets directory (create it if it doesn’t exist yet).
然后在你的活动中,
1. TextView txt = (TextView) findViewById(R.id.custom_font);
2. Typeface font = Typeface.createFromAsset(getAssets(), "<font file name>.ttf");
3. txt.setTypeface(font);
更多信息请查看: