synth
synth copied to clipboard
bower provided fonts missing in production mode
I've been playing around with synth and have found it pretty awesome to do front end prototyping with. One issue I ran into is that if you use bower to load a library like font-awesome it will not properly load the fonts when running synth in production mode. JS and CSS work fine but somehow fonts is getting lost in there.
Nice catch! This is likely due to the CSS files being concatenated and served up from the root path, breaking the relative URLs pointing to the font files.
You can try editing the CSS provided by font awesome and have them load the font files using an absolute path: e.g. /css/bower_components/font-awesome/fonts/the-font.ttf' instead offont/the-font.ttf`
(I don't know the actually font names and paths so you'll need to change them accordingly)
I tried editing font-awesome's css just to check what happens, but its seems like the resource isn't getting copied there in production mode.
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/css/bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.1.0
Hmm, I think it's because in production mode the server isn't serving up
content from front. I suppose a fix is for it to server up files from
front/bower_components at least.
On Tue, May 20, 2014 at 2:21 PM, nmcclay [email protected] wrote:
I tried editing font-awesome's css just to check what happens, but its seems like the resource isn't getting copied there in production mode.
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/css/bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.1.0
— Reply to this email directly or view it on GitHubhttps://github.com/JonAbrams/synth/issues/28#issuecomment-43684826 .