How to display local languages fonts from unicode?

此生再无相见时 提交于 2019-12-25 13:15:46

问题


Basically i am creating an app which have multiple languages fonts means english as well as local language(Hindi & some other) fonts. but the problem is it display only english text not the other.Text in other languages shown in rectangle box. I want to show all types of text. please suggest me.

Here is the snapshot


回答1:


I got my answer. here is the link This file support all Indian language fonts and english too. Just copy paste this file in assets filder and include in the code

Typeface tf = Typeface.createFromAsset(getAssets(),
            "fonts/file_name.ttf");
    TextView tv = (TextView) findViewById(R.id.yourtextview);
    tv.setTypeface(tf);


来源:https://stackoverflow.com/questions/21302390/how-to-display-local-languages-fonts-from-unicode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!