FontAwesome使用cordova / phonegap在WP8上显示为正方形 [英] FontAwesome displaying as squares on WP8 using cordova/phonegap

查看:351
本文介绍了FontAwesome使用cordova / phonegap在WP8上显示为正方形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的AngularMobileUI框架和图标只是显示为正方形。我以前尝试过Ionic框架,并做同样的。

I am using the AngularMobileUI framework and the icons just display as squares. I have previously tried the Ionic framework and that did the same.

任何人都知道如何解决这个问题,以及为什么会发生?

Anyone know how to fix this, and also why it happens?

我的图标在Android和ios上显示良好

My icons display fine on android and ios

推荐答案

Encase有人有这个问题, answer here

Encase someone has this problem, i found part of the answer here

获取网络字体在HTML5 Windows Phone应用程序上工作

FontAwesome具有可嵌入标志设置为4.首先,您需要将值设置为零。一旦完成,您需要更改css和删除的字符串加载字体文件时的字符串。

FontAwesome has the embeddable flag set to 4. First you need to set the value to zero. Once that is done, you need to change the css and remove the querystring when loading the font file.

@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.eot?v=4.1.0');
  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
}

成为

@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.eot?v=4.1.0');
  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../fonts/fontawesome-webfont.ttf') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
}



我刚刚从ttf文件中删除了querystring,因为在android和ios,这似乎没有关系。

I just removed the querystring from the ttf file, since on android and ios, this seems to not matter.

希望这有助于某人

这篇关于FontAwesome使用cordova / phonegap在WP8上显示为正方形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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