fuente personalizada para webview android
Utilizo una vista web en mi aplicación y quiero mostrar el texto en lenguaje farsi con una fuente personalizada. Coloco mi fuente en la carpeta de recursos y escribo un método para colocar texto en la vista web pero en api8 que no admite el idioma farsi. Mi texto y en apies que admiten el idioma farsi no muestran mi texto por fuente personalizada y muestran mi texto por fuente predeterminada. Lo que está mal en mi método. Gracias a mi método.
public void setText(String text)
{
String style2="<style type=\"text/css\">@font-face {font-family: 'myface';src: url('file:///android_asset/BYekan.ttf'); } body {font-family: 'myface';}</style>";
this.loadDataWithBaseURL("file:///android_asset/BYekan.ttf","<html dir=\"rtl\"><head><meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\"/>"+style2+"</head><body>"+text+"</body></html>","text/html","UTF-8",null);
setClickable(false);
setLongClickable(false);
setFocusable(false);
setFocusableInTouchMode(false);
}