1

Im working on a rails app trying to configure fonts with rails 3.1 and the asset pipeline.

I just took a look at this post

Asset pipeline, compass font-face and eot?iefix call to the font

and using the example i get a syntax issue from sass.

My code is as follows:

/* @font-face kit by Fonts2u (http://www.fonts2u.com) */ 
@font-face {
  font-family: 'Coamei Bold';
  src: font_url('fonts/COAMEI_B.eot');
  src: url('<%= asset_path('fonts/COAMEI_B.eot')+"?#iefix" %>') format('embedded-opentype'),
       font_url('fonts/COAMEI_B.woff') format('woff'),
       font_url('fonts/COAMEI_B.ttf') format('truetype'),
       url('<%= asset_path('COAMEI_B.svg')+"#Coamei-Bold" %>') format('svg');
  font-weight:normal;
  font-style:normal;
}

For some reason i get the error

Sass::SyntaxError: Invalid CSS after "...'fonts/COAMEI_B": expected ")", was ".eot')+"?#iefix..."

Is there something im missing in my css file. Any help would be greatly appreciated.

Thanks in advance

Community
  • 1
  • 1
  • What's the name of the file the code is in? – reisio Nov 14 '11 at 20:18
  • its stored in fonts.css.scss in the assets/fonts directory. I also have the file included correctly in the application.css file. Its odd cant spot any differences between the way most seem to be setting this up. – The Mitchell Nov 14 '11 at 21:06
  • rubbish, just spotted the issue. Seems to be the single quotes and double quotes mix up. doh! – The Mitchell Nov 14 '11 at 21:22
  • hmmmm odd seems to have solved the syntax error. Still no fonts though although i guess this could be my setup – The Mitchell Nov 14 '11 at 21:25
  • not sure i understand, how can it be both erb and scss. Not sure im understanding how sass hooks into rails asset pipeline etc really – The Mitchell Nov 15 '11 at 01:06

0 Answers0