Phonegap Windows phone 8自定义网页字体

Phonegap Windows phone 8 custom web-font

本文关键字:网页 字体 自定义 Windows phone Phonegap      更新时间:2023-09-26

我正在尝试在Windows Phone 8应用程序的WebView中嵌入自定义字体,并且已经尝试了所有方法。我偶然发现了一篇很有前途的文章:blogs.msdn.com/b/wsdevsol/archive/2012/10/23/about-webview-and-embedded-fonts.aspx,但没有成功。

,

@font-face {
   font-family: 'Avenir LT W01 35 Light';
   src: url('35-light/avenirltstdlight.eot');
   src: url('35-light/avenirltstdlight.eot?#iefix') format('embedded-opentype'),
        url('35-light/avenirltstdlight.woff') format('woff'),
        url('35-light/avenirltstdlight.ttf') format('truetype'),
        url('35-light/avenirltstdlight.svg#avenirltstdlight') format('svg');
   font-weight: normal;
   font-style: normal;
}

尝试只包含路径:

x-wapp0:avenir...woff

即使是Base64。有趣的是,在浏览器中打开应用程序,一切都很好。只有当它嵌入到Phonegap中时,我才会遇到问题。

你们中有谁能帮忙或有什么关于完成这一点的建议吗?

再一次,在最后,我想使用一个自定义字体(web图标)到我的HTML中,通过Phonegap显示在应用程序中。

更奇怪的是,即使是嵌入的woff base64字体也不能工作。

谢谢

尝试使用ttedit将字体上的可嵌入标记设置为0。这应该可以解决这个问题,但要确保你有权在销售应用程序之前嵌入字体。

我对一个类似问题的完整回答可能也有帮助。

我有同样的问题,这解决了我的问题:http://code.tutsplus.com/articles/the-easiest-way-to-use-any-font-you-wish--net-3927