获取网页字体与PhoneGap的和Android的工作 - 如何? [英] Getting web fonts to work with phonegap and android - how?

查看:148
本文介绍了获取网页字体与PhoneGap的和Android的工作 - 如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PhoneGap的是否支持网络字体,如果是你怎么使用它们。目前我已经得到了这个code。在我的网页,但是当加载到仿真器(在一个Android应用程序,我还没有尝试通过浏览器加载页面),这是行不通的......

Does PhoneGap support web fonts, and if so how do you use them. I've currently got this code in my page, but it doesn't work when loaded into the emulator (inside an android app, I've not tried loading the page through the browser)...

@font-face {
    font-family: 'HelveticrapRegular';
    src: url('fonts/helveticrap-webfont.eot');
    src: url('fonts/helveticrap-webfont.woff') format('woff'), url('fonts/helveticrap-webfont.ttf') format('truetype'), url('fonts/helveticrap-webfont.svg#webfontHlJ0Jib3') format('svg');
    font-weight: normal;
    font-style: normal;
}
body {
    font-family: "HelveticrapRegular", "Helvetica", "Arial", "sans serif";
}

当我打开我的网页在Firefox中,它的工作,所以我不知道我做错了。

When I load my page up in firefox, it does work, so I'm not sure what I'm doing wrong.

它可以帮助说是由fontsquirrel产生的字体CSS

It may help to say that the font CSS was generated by fontsquirrel

谢谢:)乔尔

推荐答案

我曾与在WOFF格式使用自定义字体有问题。然后,我将它从WOFF到TTF,它的工作我的Andr​​oid设备上。所以有可能是一个问题,使用WOFF格式

I had a problem with using a custom font in the Woff format. Then I converted it from Woff to Ttf and it worked on my Android device. So there might be a problem with using Woff format.

所以,从.woff到的.ttf转换可能解决问题。

这篇关于获取网页字体与PhoneGap的和Android的工作 - 如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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