英文单词之间的Andr​​oid泰米尔语字体 [英] Android Tamil font between english word

查看:213
本文介绍了英文单词之间的Andr​​oid泰米尔语字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个TextView有介于两者之间,我有一个泰米尔人字一个巨大的文字,我知道如何使嵌入泰米尔字体在单独的TextView。但我需要英文单词之间的泰米尔话,请帮助在此先感谢。

正文我在TextView的一部分:

  

像欢迎(நல்வரவு)季节性的消息被用在合肥鹏远。   志愿者绘制合肥鹏远在寺庙,有时做时,   奉献者的

解决方案

尝试设置此 Akshar.ttf 通过setTypeface字体您的TextView,它suuports英语和泰米尔语。


下面是结果:

或者,寻找它支持的语言有类似的字体。


你的第二个解决方案是使用使用图片这个小的泰米尔文部分的 SpannableStringBuilder


$ C $下自定义字体设置为TextView的:

假设你有 Akshar.ttf 字体中的字体文件夹下的资产文件夹:

 字样TF = Typeface.createFromAsset(getAssets(),字体/ Akshar.ttf);
    TextView的电视=(TextView中)findViewById(R.id.C​​ustomFontText);
    tv.setTypeface(TF);
    tv.setText(像迎季节性消息(நல்வரவு)用于在合肥鹏远志愿者绘制合肥鹏远在寺庙,有时做的时候奉献的。);
 

I am having a TextView that has a huge text in between i have a tamil word and i know how to embedd the tamil font in seperate textview .but i need the tamil word between english word please help thanks in advance

my part of text in textview :

Seasonal messages like welcome (நல்வரவு) is used in Kolam. Volunteering to draw kolam at temple is sometimes done when a devotee's

解决方案

Try setting this Akshar.ttf font to your TextView through setTypeface, it suuports both English and Tamil.


Here is the outcome:

Or, look for a similar font which supports both language.


your second solution is to use image for this small Tamil text portion using SpannableStringBuilder.


Code for setting custom font to TextView:

Assuming you have the Akshar.ttf font in fonts folder under assets folder:

 Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/Akshar.ttf");               
    TextView tv = (TextView) findViewById(R.id.CustomFontText);
    tv.setTypeface(tf);
    tv.setText("Seasonal messages like welcome (நல்வரவு) is used in Kolam. Volunteering to draw kolam at temple is sometimes done when a devotee's");

这篇关于英文单词之间的Andr​​oid泰米尔语字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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