I am developing an application in which i want Punjabi language text in my application.
Therefore i save (AnmolUni.ttf)font file in the assets folder in my application. But still i didn't get the proper view. The emulator shows me boxes somewhere.
here is my code
Typeface myfon开发者_运维技巧t;
myfont=Typeface.createFromAsset(getAssets(),"AnmolUniHeavy.ttf");
TextView textview = (TextView)findViewById(R.id.TextView01);
//textview.setText("ਸਤਿਗੁਰ ਪ੍ਰਸਾਦਿ ॥ਤਤਕਰ ");
textview.setTypeface(myfont);
}
so can you give me any solution for it.
A lot of languages (especially Indian ones) are not supported as yet on Android. The problem arises because of that. You might just have to wait for the release that does support. There are some threads on the web that allow you install fonts once you have rooted your phone, but you may not be able to do that with your application. Check this link out for adding more resources to the android phone.
精彩评论