cristianferrarig / font-awesome-middleman

Font-Awesome web fonts and stylesheets as a Middleman engine
MIT License
51 stars 16 forks source link

Not compatible with asset_hash #3

Open tmaier opened 11 years ago

tmaier commented 11 years ago

I have asset_hash activated.

the URL of the font should not be /fonts/fontawesome-webfont.woff?v=3.2.1, but /fonts/fontawesome-webfont-12f8c193.woff

It seems like font-url is not supported.

https://github.com/cristianferrarig/font-awesome-middleman/blob/master/app/assets/stylesheets/_path.scss

I'm not sure if this a middleman specific problem or not... But other (not middleman related projects) use url('<%= font_path('fontawesome-webfont.woff') %>')

e.g. https://github.com/bokmann/font-awesome-rails/blob/master/app/assets/stylesheets/font-awesome.css.erb

tmaier commented 11 years ago

Well.. it seems to be a race condition which gets visible when also activating asset_host.

So it seems to be directly related to middleman....

I keep this issue open for now.

cristianferrarig commented 11 years ago

@tmaier, I'll check it barely can. Thank you!

zacksiri commented 10 years ago

@cristianferrarig I just tried this out, and can confirm that @tmaier 's solution works thank you @tmaier however i don't think this has been merged into the main repo.

zacksiri commented 10 years ago

@tmaier seems you are still using the old prefix .icon the new font awesome is .fa

tmaier commented 10 years ago

Yes, @zacksiri. My fork is still based on the old FontAwesome version.

The related issue at middleman (middleman/middleman-sprockets#46) is still open. So font-url() still generates wrong font urls.