我尝试过很多例子,其中不包括work.Here是我想要做的。我有一个phonegap eclipse project.here是项目结构

我想为我的项目添加自定义语言。这是我的MainActivity.java
import org.apache.cordova.DroidGap;
import android.os.Bundle;
public class MainActivity extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/index.html");
}
}这是我的index.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum- scale=1, minimum-scale=1, width=device-width;" />
<title>Directory Reader</title>
<link rel="stylesheet" href="jquery/jquery.mobile-1.1.1.min.css" />
<script src="jquery/jquery-1.8.0.min.js"></script>
<script src="jquery/jquery.mobile-1.1.1.min.js"></script>
<script type="text/javascript" src="cordova-2.0.0.js"></script>
<style type="text/css">
@font-face {
font-family: MyCustomFont;
src: url("NotoSansSinhala-Regular.eot") /* EOT file for IE */
}
@font-face {
font-family: MyCustomFont;
src: url("NotoSansSinhala-Regular.ttf") /* TTF file for CSS3 browsers */
}
body {
font-family: MyCustomFont, Verdana, Arial, sans-serif;
font-size: medium;
color: black
}
</style>
</head>
<body>
<p> test goda </p>
</div>
</body>
</html>我想要显示的字体仍然没有显示在移动device.its上,显示英文字符"test“。知道怎么解决这个问题吗?
发布于 2015-04-01 10:58:15
在Android4.4上安装僧伽罗文本基本上需要根根设备,但它可以在Android 5.0+上运行。
您基本上需要以下步骤:
请参阅阅读说明与屏幕热这里
https://stackoverflow.com/questions/29386021
复制相似问题