【发布时间】:2011-04-12 15:16:23
【问题描述】:
我正在尝试在文本视图中使用自定义字体:
tv=(TextView)findViewById(res);
Typeface font = Typeface.createFromAsset(this.getAssets(), "fonts/font.ttf");
tv.setTypeface(font);
但是当我运行时出现以下错误:
W/System.err( 542): java.lang.RuntimeException: native typeface cannot be made
什么问题?
【问题讨论】:
-
@Paresh:任何资源 (R.id.foo)
-
@Praveen:我猜它的代码相同。但我仍然得到这个运行时异常