Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
98
rated 0 times [  102] [ 4]  / answers: 1 / hits: 46087  / 9 Years ago, wed, september 9, 2015, 12:00:00

I have downloaded FontAwesome using npm and then copied the css-file and the fonts into the right folders in the root-diretory of my electron-application using grunts copy task.


So far so good. Everything is where it is supposed to be.


Now, when i am referencing FontAwesome in my app, the icons do not get loaded. These are the errors that I get in the console:



Failed to decode downloaded font:

file:///path/to/fonts/fontawesome-webfont.woff2?v=4.4.0

OTS parsing error: Failed to convert WOFF 2.0 font to SFNT


Failed to decode downloaded font:

file:////path/to/fonts/fontawesome-webfont.woff?v=4.4.0

OTS parsing error: incorrect file size in WOFF header


Failed to decode downloaded font:

file:////path/to/fonts/fontawesome-webfont.ttf?v=4.4.0

OTS parsing error: incorrect entrySelector for table directory



I have already tried to modify FontAwesome's css file by removing all the version parameters but this does not seem to be the problem. The Issues comes up both by starting the app via electron . and when viewing the html-file in the browser.


UPDATE


To Answer some comments:



  • This problem occurrs in electron as well as in the browser (tested in chrome and firefox)

  • I am using the newest versions of both, FontAwesome (4.4.0) and Electron (0.32.1) (fresh install via npm)

  • css is loaded like: <link rel="stylesheet" type="text/css" href="css/font-awesome.css" >


More From » css

 Answers
44

The Problem was in my grunt-file. I tried to reproduce the issue by simply downloading all dependencies manually at their vendors websites and placed them in the corresponding script-folder of my project - suddenly it worked.



I switched to gulp now and it still works. No idea what i was doing wrong with grunt though...


[#65131] Monday, September 7, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jarvisjovannia

Total Points: 127
Total Questions: 123
Total Answers: 101

Location: Netherlands
Member since Mon, Jun 7, 2021
3 Years ago
;