如何显示来自Unicode的本地语言字体? [英] How to display local languages fonts from unicode?

查看:197
本文介绍了如何显示来自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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆