pagefront / ember-pagefront

Official Pagefront Ember Addon
MIT License
13 stars 7 forks source link

Fonts not loading correctly on mobile, bad static handling? #11

Closed knownasilya closed 8 years ago

knownasilya commented 8 years ago

Something like https://github.com/ember-cli/ember-cli/issues/1532 tested on Galaxy Note 2.

Although I'm using ember-cli 1.13.13. Basically I have the fonts, and a verbose deploy shows that they are uploaded but when I try to access the font from the browser I get html back: https://scg.pagefrontapp.com/fonts/fontawesome-webfont.woff2?v=4.5.0

An in chrome (desktop) I get:

Failed to decode downloaded font: https://scg.pagefrontapp.com/fonts/fontawesome-webfont.woff2?v=4.5.0
scg.pagefrontapp.com/:1 OTS parsing error: invalid version tag
jasonkriss commented 8 years ago

There definitely may be other issues at play as well but it looks like the font is actually located at /assets/fonts/fontawesome-webfont.woff2?v=4.5.0 (note the assets prefix). Is this working locally?

knownasilya commented 8 years ago

I tried $fa-font-path: "assets/fonts"; as well with no luck. It fixes the version error, but doesn't work on mobile.

jasonkriss commented 8 years ago

Alright, thanks for trying that. So are you still getting the Failed to decode downloaded font: https://scg.pagefrontapp.com/fonts/fontawesome-webfont.woff2?v=4.5.0? Also, does it work locally?

knownasilya commented 8 years ago

So I don't get that error, it works from desktop, but still doesn't work on mobile.

jasonkriss commented 8 years ago

Got it. Thanks! Let me look into it. I'll get back to you.

knownasilya commented 8 years ago

I fixed it. I moved the fonts to /fonts instead of /assets/fonts and updated the path to ./fonts. Looks like it doesn't work in /assets...

jasonkriss commented 8 years ago

interesting. Not sure why that wouldn't work the same as setting $fa-font-path. Thanks for following up though.