我正在开发一个使用 webfont 来显示泰语/老挝语字符的应用程序。为此,我定义了一个自定义字体,如下所示:
@font-face {
font-family: 'SaysetthaWeb';
src: url('./saysettha-web.eot') format('embedded-opentype');
src: url('./saysettha-web.eot?#iefix') format('embedded-opentype'),
url('./saysettha-web.woff') format('woff'),
url('./saysettha-web.ttf') format('truetype'),
url('./saysettha-web.svg#SaysetthaWeb') format('svg');
font-weight: normal;
font-style: normal;
}
现在,当我在 ionic 网络服务器上测试它时,ionic serve
它在 Firefox 和 Chrome 上运行良好:我可以看到字体已加载,字符显示正确(我在 Mac OS X Mountain Lion 上工作)。
然后,当我在我的 android 设备(带有 Android 4.2.1 Jelly Beans 的 Galaxy Nexus)上进行测试时ionic run android
,泰语/老挝语字符没有显示,而是有一个空格。
我通过加载符号字体来测试我的 webfont/font-face CSS 代码,以检查字母是否被 web borwser 以及 android 设备上的符号替换,并且运行良好。
我试图修复 index.html 上的元标记,但没有奏效:
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
我还尝试在我的 html 页面的源代码中使用十六进制代码,但结果是一样的。
我真的很困惑......有什么想法吗?
谢谢!