以下代码适用于所有Android手机但不适用于华为P9 lite。没有错误,请帮助我。
TextView sint1 = (TextView) findViewById(R.id.textView2);
Typeface cFont1 = Typeface.createFromAsset(getAssets(), "cf.ttf");
sint1.setTypeface(cFont1);
答案 0 :(得分:-1)
Android并不支持全系列的ttf字体。这是我在我的应用中亲自使用的font。请尝试使用它。如果这个有效,而你的urdu没有,那么你的代码就更正了,Android也不支持你的字体。如果两者都不起作用,那么你的代码就会出错。