且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

字体真棒4.1.0在科尔多瓦Android模拟器无法正常工作

更新时间:2023-01-01 09:47:34

回答我的问题...

我复制了FontAwesome文件夹到我的项目文件夹,但使用科尔多瓦模拟机器人字体真棒文件夹没有被构建时。复制FontAwesome文件夹放到CSS文件夹,并改变相关链接路径纠正这个问题。

I can't figure out why Font Awesome icons aren't showing up in my cordova app.

I downloaded the entire font-awesome folder and copied it to my project's folder. I've included the folder with:

<link rel="stylesheet" href="../font-awesome-4.1.0/css/font-awesome.min.css">

I am certain this is correct because <i class="fa fa-bars fa-2x"></i> will display in chrome perfectly fine.

However when I run cordova emulate android the icons don't show up in my android emulator.

I then tried following the troubleshooting here: https://github.com/FortAwesome/Font-Awesome/wiki/Troubleshooting

It seems that the troubleshooting thinks this is an error related to text-rendering, but when I add text-rendering: auto; to .fa { } in both the minified and the full css, I still don't see the icons in my android emulator.

I'm at a loss of what to do. My android target project is 4.4.2 api level 19. Can anyone help?

Here's the html section related to the icons.

<body> 
    <div id="main">
           <div id="top">
               <i id="settings" class="fa fa-bars fa-2x"></i>
               <p id="logo" > Chowza Inc </p>
          </div>
    </div>
...
</body>

Answering my own question...

I copied the FontAwesome folder into my project folder but when using cordova emulate android the Font Awesome folder was not being built. Copying the FontAwesome folder into the CSS folder and changing the related link paths corrected this issue.