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

Already on GitHub? Sign in to your account

font is not downloaded #22

Closed
caarlos0 opened this Issue Jan 9, 2013 · 7 comments

Comments

Projects
None yet
2 participants
Contributor

caarlos0 commented Jan 9, 2013

I'm using:

  • bootstrap-sass (2.2.2.0)
  • font-awesome-sass-rails (3.0.0.1)
  • sass (3.2.5)
  • sass-rails (3.2.5)

Instead of showing the fonts, I just gem some "squares" or something like that. Looking at developer tools, no font is downloaded.

It was working before I update my gems today. (but I was with version 2.0.0).

BTW, my application.css.scss:

*= require_self
 *= require bootstrap-datepicker
 *= require_tree .
 */

@import "bootstrap";
body {
  padding-top: 60px;
}
@import "bootstrap-responsive";
@import "font-awesome";

@font-face {
  font-family: 'Pontano Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Pontano Sans'), local('PontanoSans-Regular'), url(/assets/pontanosans.woff) format('woff');
}

*{
  font-family: 'Pontano Sans', sans-serif !important;
}

// rest of file...

The Pontano Sans in the example is working.

If I try to access http://localhost:5000/assets/fontawesome-webfont.ttf , for example, the font is downloaded as expected.

Well, I'm out of ideas here.

Just to let you know you're not the only one -- as soon as I upgraded from font-awesome-sass-rails 2.0.0.0 to font-awesome-sass-rails 3.0.0.1 I started having the same problem -- font-awesome icons show up as a generic character.
What's more, downgrading again to 2.0 doesn't seem to fix the problem.

Contributor

caarlos0 commented Jan 10, 2013

hm, I'll try that.

BTW, I talk to a friend, and he's having this issue too.

Looks like general.

Removing the css "font-family" from the element that the icon-* class was set on resolved this for me (hadn't seemed to be a problem in 2.0). Set the icon-* class on an tag instead as recommended.

that should have been "an 'i' tag"

Contributor

caarlos0 commented Jan 12, 2013

Sorry.. I don't understand what exactly you do to fix this, @planetwork... can you please explain a little more?

I had set the class on a P tag, as in <p class='icon-star'> and had also set a font-family rule on that p tag.
Removing the font-family css rule fixed the problem, but a better solution is to include the font-awesome selector inside an I tag, as in <p><i class='icon-star'></i>foobar</p>

Hope that helps

Contributor

caarlos0 commented Jan 12, 2013

Hey @planetwork, try my fork without your hacks, it should work now. That was a small permission issue.

@caarlos0 caarlos0 closed this Sep 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment