1

I am using two font icons in a project. Font Awesome and a customize SVG font. All font files are in same folder. Here is the file structure:

-assets
    -css
        -font-awesome.min.css
        -themefy.css
    -fonts
        -font-awesome.eot
        -font-awesome.svg
        -font-awesome.ttf
        -font-awesome.woff
        -font-awesome.woff2
        -font-awesomed41d.eot
        -themify.eot
        -themify.svg
        -themify.ttf
        -themify.woff
        -themifyd41d.eot

Both fonts are working fine in localhost but themify font doesn't works after deployment. It returns a 404 not found in chrome console. I had a lot of study on it for 2/3 days still can't figure out what is the problem. Here is my themify @font-face:

themify.css

@font-face {
    font-family: 'themify';
    src:url('../fonts/themify.eot?-fvbane');
    src:url('../fonts/themifyd41d.eot?#iefix-fvbane') format('embedded-opentype'),
        url('../fonts/themify.woff?-fvbane') format('woff'),
        url('../fonts/themify.ttf?-fvbane') format('truetype'),
        url('../fonts/themify.svg?-fvbane#themify') format('svg');
    font-weight: normal;
    font-style: normal;
}

If you want to see it live: http://smartrahat.com/

smartrahat
  • 5,381
  • 6
  • 47
  • 68

2 Answers2

4

Please remove the suffix (?-fvbane) from fonts CSS may be this can be caused for 404.

Paul LeBeau
  • 97,474
  • 9
  • 154
  • 181
Santosh Khalse
  • 12,002
  • 3
  • 36
  • 36
0

Add codes at the below to your Web.config file.

  <system.webServer>
    <staticContent>
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="font/woff" />
    </staticContent>    
  </system.webServer>
Leo
  • 398
  • 6
  • 11