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

Packages with fonts do not compile #182

Open
chrisvel opened this issue Dec 16, 2015 · 4 comments
Open

Packages with fonts do not compile #182

chrisvel opened this issue Dec 16, 2015 · 4 comments

Comments

@chrisvel
Copy link

I am using font-awesome and bootstrap packages on my project and working fine locally on a development environment. When I deploy to production (cloud66) the icons (fonts actually I believe) do not appear on the page, but instead of it they appear as "squares with letters" inside. What do I miss ?

@chrisvel
Copy link
Author

One thing that works is setting up in application.css.scss :

@font-face {
  font-family: 'FontAwesome';
  src: font-url('font-awesome/fonts/fontawesome-webfont.eot?v=4.0.3');
  src: font-url('font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),
       font-url('font-awesome/fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),
       font-url('font-awesome/fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),
       font-url('font-awesome/fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Glyphicons Halflings';
  src: font-url('bootstrap/fonts/glyphicons-halflings-regular.eot');
  src: font-url('bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
       font-url('bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'),
       font-url('bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'),
       font-url('bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}

but I don't understand why do I have to do so or why doesn't it work automatically, as in development environment everything is picked up and served by the web server.

@SergeyKishenin
Copy link
Collaborator

This is a known issue with fonts compiling https://github.com/rharriso/bower-rails/search?q=font&type=Issues&utf8=%E2%9C%93

@ericenns
Copy link

I am having the same problem and tried what @chrisvel described but that isn't working for me.

@ericenns
Copy link

I ended up getting it working, I just had to add the fonts to be precompiled assets which I was missing.

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

3 participants