generator-angular-fullstack icon indicating copy to clipboard operation
generator-angular-fullstack copied to clipboard

Failed to decode downloaded font

Open Exegetech opened this issue 11 years ago • 11 comments

I am trying to incorporate my own font. I put the font in client/assets/fonts/Gotham-Bold.otf

This is the error that I got Failed to decode downloaded font http://localhost:9000/fonts/Gotham-Bold.otf

however, the backend console says GET /fonts/Gotham-Bold.otf 200 3ms

I also test this using plain express app and it works just fine. Is there any configuration specific to express in this generator tha makes this possible?

Exegetech avatar Jun 08 '15 19:06 Exegetech

Can you show request / response headers and anything else relevant?

Awk34 avatar Jun 16 '15 19:06 Awk34

Request

GET /fonts/admindesigns/admindesigns.woff HTTP/1.1
Host: localhost:9000
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)                 Chrome/43.0.2357.130 Safari/537.36
Accept: */*
Referer: http://localhost:9000/assets/css/template.css
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
Cookie: token=x
If-None-Match: "6084-1435335632980"
If-Modified-Since: Fri, 26 Jun 2015 16:20:32 GMT

Reponse

HTTP/1.1 304 Not Modified
X-Powered-By: Express
Accept-Ranges: bytes
ETag: "6084-1435335632980"
Date: Tue, 30 Jun 2015 16:20:21 GMT
Cache-Control: public, max-age=0
Last-Modified: Fri, 26 Jun 2015 16:20:32 GMT
Connection: keep-alive

ghost avatar Jun 30 '15 16:06 ghost

Strangely font awesome works

GET /bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.1.0 HTTP/1.1
Host: localhost:9000
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)         Chrome/43.0.2357.130 Safari/537.36
Accept: */*
Referer: http://localhost:9000/app/app.css
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
Cookie: token=x

ghost avatar Jun 30 '15 16:06 ghost

Hmmm okay, so it looks like it's passing a file, but it might be getting corrupted in transit. Can you see what the font file being passed from the server looks like?

Awk34 avatar Jun 30 '15 21:06 Awk34

By any chance are you using maven to build? Are you sure the deployable contains the right-sized font file in it? Just resolved the same problem by disabling maven filtering for binary files.

wortner avatar Jul 09 '15 06:07 wortner

I'm getting this error on an angular-fullstack app using ui-grid's symbol font. We are using grunt, not maven, for build.

CaptainLexington avatar Jul 09 '15 16:07 CaptainLexington

Same problemm here but with 1

Network info: Remote Address:54.209.2.103:80 Request URL:http://tdcosta-tdcosta.rhcloud.com/fonts/glyphicons-halflings-regular.woff Request Method:GET Status Code:200 OK

I put fonts into a folder but nothing..

uiktiomasfeliz avatar Nov 19 '15 19:11 uiktiomasfeliz

I find the sollution! put manual font folder from bootstrap dist folder, and the error no show more! 2

uiktiomasfeliz avatar Nov 21 '15 17:11 uiktiomasfeliz

I love you!

Sent from my iPhone

On 21 Nov 2015, at 17:18, uiktiomasfeliz [email protected] wrote:

I find the sollution! put manual font folder from bootstrap dist folder, and the error no show more!

— Reply to this email directly or view it on GitHub.

ghost avatar Nov 21 '15 17:11 ghost

awesome you are :+1:

raghavbali avatar Dec 17 '15 03:12 raghavbali

I am also facing the same issue. Solution suggested by you above won't help in production environment.

prabhansh0705 avatar Mar 06 '16 09:03 prabhansh0705