老挝的字体呈现在Android 4.3离子空白 [英] Lao font render blank on android 4.3 ionic

查看:225
本文介绍了老挝的字体呈现在Android 4.3离子空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要我的应用程序两种语言,包括老挝和英语,我用国际化的本地化。我已经定制字体家族风格老挝语如下:

My app required two languages including Lao and English and I use i18n for localisation. I have customised font family style to lao language as the following:

@font-face {
 font-family: 'customfont';
 src: url('../lib/ionic/fonts/phetsarath.ttf') format("truetype");
}
body {
 font-family: 'customfont';
 font-size:30px;
}

它适用于Chrome,但不是在Android设备(的Nexus 3)4.3版本。任何解决方案,能够使老挝的字体在Android设备。

It works on chrome but not on android device(Nexus 3) version 4.3. Any solutions to be able to render lao font in that android device.

推荐答案

我已经找到了解决方案。最好的字体格式在Android 4.3的工作是SVG。

I have figured out the solution. The best font format working in android 4.3 is svg.

@font-face {
    font-family: 'phetsarath_otecorner';
    src: url('font/phetsarath_ot.svg');
    src: url('font/phetsarath_ot.svg#phetsarath_otregular') format('svg'),
         url('font/phetsarath_ot.woff') format('woff'),
         url('font/phetsarath_ot.eot?#iefix') format('embedded-opentype');
    font-weight: normal;
    font-style: normal;
}

和应用FONT-FAMILY如下。

And apply the font-family as following.

body, .ionic-body {
  font-family: 'phetsarath_otecorner', sans-serif;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'phetsarath_otecorner', sans-serif;
} 

.tab-item {
   font-family: 'phetsarath_otecorner', sans-serif;
}

input, button, select, textarea {
   font-family: 'phetsarath_otecorner', sans-serif;
}

.roboto {
   font-family: 'phetsarath_otecorner', sans-serif;
}
.roboto input {
   font-family: 'phetsarath_otecorner', sans-serif;
}

这篇关于老挝的字体呈现在Android 4.3离子空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆