Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/216.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在android中使用泰米尔字体_Android_Fonts - Fatal编程技术网

如何在android中使用泰米尔字体

如何在android中使用泰米尔字体,android,fonts,Android,Fonts,这是我的泰米尔UTF-8 unicode字符串 “U0000E00\UU000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

这是我的泰米尔UTF-8 unicode字符串

“U0000E00\UU000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 u00ae\u00aa\u00e0\u00ae\u009f\u00e0\u00ae\u00ae\u00ae\u00e0\u00af\u008d”

我想解码并显示泰米尔字体

在安卓系统中,这是可能的,怎么办


请帮助我

如果您使用的是webview,请将您的字体文件“tamilfont.ttf”放在资产文件夹中。 java代码与此类似。请注意,字体应用于css中

    data = "<html><head><style>@font-face {font-family: 'tamilfont';src: url('file:///android_asset/tamilfont.ttf');} h1 { font-family: 'tamilfont'; } </style></head><body> <h1>தமிழன்!</h1> </body></html>"; 
    WebView wv = (WebView)findViewById(R.id.webview);
    wv.loadDataWithBaseURL(null, data, "text/html", "UTF-8", null);
data=“@font-face{font-family:'tamilfont';src:url('file:///android_asset/tamilfont.ttf');}h1{font系列:“泰米尔字体”;}தமிழன்! "; 
WebView wv=(WebView)findviewbyd(R.id.WebView);
wv.loadDataWithBaseURL(null,数据,“文本/html”,“UTF-8”,null);

这种方法在android 2.0和2.1中不起作用。

在android中显示泰米尔语的最佳方法是使用所述的TSCII字体。Unicode尚未完全受支持。

您可以将泰米尔语(ttf)字体保存在assets文件夹中,并按如下方式使用:

TextView text; // initialize to your textview
Typeface tf = Typeface.createFromAsset(this.getAssets(),"fonts/tamil.ttf");
text.setTypeface(tf);

步骤1:下载泰米尔字体
.ttf
文件(例如说kanchi.ttf

步骤2:现在在android项目的
资产
文件夹中创建一个目录“字体

第3步:现在将kanchi.ttf文件复制到Android项目中的
assets/fonts
文件夹中

步骤4:将这些行添加到您的
onCreate()

第5步:现在将此字体提供给您想要的
文本视图

    textview= (TextView) findViewById(R.id.tipstext);
    textview.setTypeface(tamil);
    textview.setTextSize(20);
    textview.setText( "nkZk;");

我需要打开泰米尔字体转换文档到pdf,然后尝试在android手机中打开

您使用的是webview还是TextView现在转到其他问题,并接受最上面的答案,以向SO社区提供预期反馈。您好,我使用的是json,存储为string@PM帕雷什·马亚尼:你能告诉我“他”在哪里提到网络吗视图。我猜“他”就是“我”。)嗨,谢谢你的帮助。我还有一个疑问,我想在这里展示一下。”இந்த மொழியில்: 如何在文本视图中设置此字符串这不是正确的回答方法,请提供一些参考、代码和链接。
    textview= (TextView) findViewById(R.id.tipstext);
    textview.setTypeface(tamil);
    textview.setTextSize(20);
    textview.setText( "nkZk;");