Typeface tf = Typeface.createFromAsset(getAssets(), "Bamini.ttf");
String tamil_string="செய்திகள்";
//creating intance of TamilFotnUtil Class
TamilFontUtil tfUtil = new TamilFontUtil();
//Convert Tamil font encording using the utility.
String tamilStringEncoded = tfUtil.convertTamilString(tamil_string);
在样式内添加以下行
@font-face {font-family: MyCustomFont; src: url("Bamini.ttf")}body {font-family: MyCustomFont, Verdana, Arial, sans-serif; font-size: medium; color: black}"
例如
<html> <head>
<title>example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">@font-face {font-family: MyCustomFont; src:
url(file:///android_asset/Bamini.ttf)}body {font-family: MyCustomFont, Verdana, Arial,
sans-serif; font-size: medium; color: black}</head><body>
<h1>tamilStringEncoded </h1></body></html>
最后将数据加载到 webview ....