Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bower provided fonts missing in production mode #28

Open
nmcclay opened this issue May 19, 2014 · 3 comments
Open

bower provided fonts missing in production mode #28

nmcclay opened this issue May 19, 2014 · 3 comments

Comments

@nmcclay
Copy link

nmcclay commented May 19, 2014

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.

@JonAbrams
Copy link
Owner

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)

@nmcclay
Copy link
Author

nmcclay commented May 20, 2014

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

@JonAbrams
Copy link
Owner

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 notifications@github.com 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//issues/28#issuecomment-43684826
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants