2

I'm using gulp-iconfont v4 to generate fonts from SVGs in a folder. I'm using a swig template to generate a .scss file and include that in my app.scss.

When I serve the files I get the following error in the console: Failed to decode downloaded font and the icons appear as [].

When I navigate to the file in the url, it downloads fine. What could be causing the browser to not decode them?

I've looked at the following with no resolution:

Sometimes the warning comes from the .html page but sometimes it will come from Modernizr or most recently in jquery-1.7.2.min.js which isn't actually included anywhere :/

Everything 'works' so I'm not sure what code would be of use.

Here's the response from the file request:

enter image description here

When I look at the files in the resource panel it just shows the normal A-Z and not any glyphs. Not sure what the expected result is.

EDIT:

I've validated the font using Font Book and all looks well.

enter image description here

However, the info indicates there are two glyphs (when there should be only one currently) and also doesn't display them at all.

enter image description here

Community
  • 1
  • 1
Craig
  • 972
  • 3
  • 13
  • 38
  • "Failed to decode downloaded font" means the font you generated is either corrupt, or is incomplete (missing metrics, necessary tables, naming records, a million possible things). Take the .ttf that gulp generated, and see if it can be unpacked/repacked using [TTX](https://github.com/behdad/fonttools), or even run it through the [OTS](https://github.com/khaledhosny/ots) validator (used by Chrome and Firefox) to see where things break down. – Mike 'Pomax' Kamermans Aug 25 '15 at 01:32
  • I validated the font using Font Book and it passed, however it doesn't show any glyphs. – Craig Aug 25 '15 at 11:31
  • then fontbook is wrong. Try a TTX conversion and see what's actually there. And perhaps also link to the offending font – Mike 'Pomax' Kamermans Aug 25 '15 at 16:20
  • Hi did you come up with a solution in the end? – Staple Oct 01 '15 at 21:22
  • Moving back to v1 of the gulp plugin solved the issue. I really can't explain what the real issue is. – Craig Oct 02 '15 at 10:29

0 Answers0