如何显示来自Unicode的本地语言字体? [英] How to display local languages fonts from unicode?
本文介绍了如何显示来自Unicode的本地语言字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是快照
解决方案
我得到了我的答案。这里是链接
此文件支持所有印度语言字体和英文也是如此。只需要将这个文件复制粘贴到assets filder中并包含在代码中即可。
Typeface tf = Typeface.createFromAsset(getAssets(),
fonts / file_name.ttf);
TextView tv =(TextView)findViewById(R.id.yourtextview);
tv.setTypeface(tf);
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
解决方案
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);
这篇关于如何显示来自Unicode的本地语言字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文