打破阿拉伯字体 [英] Break Arabic Font

查看:36
本文介绍了打破阿拉伯字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作 android 应用程序,其中我必须为那些不存在阿拉伯语的手机提供对阿拉伯语文本的支持.

我通过添加以下代码在小部件(文本视图、按钮等)中成功地做到了这一点.

我在assests文件夹中添加了dejavusans.ttf文件.在我添加的代码中

 TypeFace typeFace = Typeface.createFromAsset(context.getAssets(), "dejavusans.ttf");fieldName.setTypeface(typeFace);fieldName.setText(ArabicUtilities.reshape(resources.getString(R.string.bring_financial_arabic)));

但问题出在 WebView 上.webView 的文本正在中断.我看到了不同的解决方案,包括

我将阿拉伯语粘贴到其中并复制结果,然后将结果粘贴到我的 html 文件中.结果是这样的.

虽然不是 100% 准确,但比之前的要好很多.

I am making android app in which I have to give support of Arabic text to those mobiles in which Arabic is not present.

I successfully did this in widgets(textview, button etc) by adding following code.

I ahve added dejavusans.ttf file in assests folder. and in code I added

    TypeFace typeFace = Typeface.createFromAsset(context.getAssets(), "dejavusans.ttf"); 
fieldName.setTypeface(typeFace);   
fieldName.setText(ArabicUtilities.reshape(resources.getString(R.string.bring_financial_arabic)));

But the problem is with WebView. The text of webView is breaking. I saw different solutions including How to change font face of Webview in Android?. But no one is working fine. Here is the snapshot. The title(TextView) is looking fine but the webpage text is breaking.

If anyone know its answer then please help.

Thanks

解决方案

I found a solution of this problem.

I used the following tool http://www.arabic-keyboard.org/photoshop-arabic/

I pasted my arabic in it and copy the result then I pasted the result in my html file. The result is like this.

Although it is not 100 percent accurate but it is much better than previous one.

这篇关于打破阿拉伯字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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