0

I'm using Compass and it's built-in @include font-face mixin. However, the fonts are not loading. I think this may be due to the series of numbers being added to the end of the file path when it compiles.

Compiled CSS:

@font-face { font-family: "Helvetical-Neue"; src: url('/css/fonts/2C7F11_0_0.eot?1415225657'); src: url('/css/fonts/2C7F11_0_0.eot?&1415225657#iefix') format('embedded-opentype'), url('/css/fonts/2C7F11_0_0.ttf?1415225657') format('truetype'), url('/css/fonts/2C7F11_0_0.woff?1415225657') format('woff'); }
@font-face { font-family: "Helvetical-Neue-Condensed"; src: url('/css/fonts/2C7F17_0_0.eot?1415225657'); src: url('/css/fonts/2C7F17_0_0.eot?&1415225657#iefix') format('embedded-opentype'), url('/css/fonts/2C7F17_0_0.ttf?1415225657') format('truetype'), url('/css/fonts/2C7F17_0_0.woff?1415225657') format('woff'); }

Font declarations in Compass:

@include font-face("Helvetical-Neue", font-files("2C7F11_0_0.ttf", "2C7F11_0_0.woff"), "2C7F11_0_0.eot");
@include font-face("Helvetical-Neue-Condensed", font-files("2C7F17_0_0.ttf", "2C7F17_0_0.woff"), "2C7F17_0_0.eot");

$helvetica-neue: "Helvetical-Neue" !default;
$helvetica-condensed: "Helvetical-Neue-Condensed" !default;

My fonts are in the default css/fonts directory and I set my config.rb to the following:

fonts_dir = "css/fonts"

Researching this question, I came across relative_assets = true. I've tried it both with and without that and there has been no change.

Is there something I am missing or doing incorrectly? All other assets (images, videos, etc.) load just fine.

Thank you for your time. I appreciate it!

BastionGamma
  • 321
  • 3
  • 17
  • What does your URL structure look like when loading the page? I feel like the absolute url path is probably the issue. – Steve Sanders Nov 06 '14 at 21:17
  • 1
    Did you make sure that it recompiles after you change the config.rb? Note that config.rb is only checked when you initially run `compass watch`, it doesn't continuously check it each time your files change. – cimmanon Nov 06 '14 at 22:14
  • I didn't know that. Redid compass watch w/ relative and that fixed it. Thanks! – BastionGamma Nov 06 '14 at 23:42

0 Answers0