0
我开发phonegap应用程序。在我的应用程序中有两种语言英语和高棉语。但我的设备不显示高棉语。我如何在代码中嵌入字体?如何在Android手机中嵌入字体样式?
我开发phonegap应用程序。在我的应用程序中有两种语言英语和高棉语。但我的设备不显示高棉语。我如何在代码中嵌入字体?如何在Android手机中嵌入字体样式?
把你的CSS文件中的,例如example.css:
@font-face {
font-family: "customfont";
src: url("./fonts/arial.ttf") format("opentype");
/* Make sure you defined the correct path, which is related to
the location of your file `example.css` */
}
body {
font-family: "customfont";
font-size:30px;
}
- 参考你的HTML CSS文件example.css:
<link rel="stylesheet" href="./css/example.css" />
请务必遵循正确的目录结构
例如,假设您有以下目录结构:
种WWW
CSS
字体