0

I am getting error that is not finding Fonts in production server in chorom. I am not getting it in my local.

This is the error I am getting:

enter image description here

That is how I am adding the fonts:

This is my fontFamilies.less

@font-dir: "../fonts";
@font-face {font-family: 'AvenirLTStd-Book';src: url('@{font-dir}/31744E_2_0.eot');src: url('@{font-dir}/31744E_2_0.eot?#iefix') format('embedded-opentype'),url('@{font-dir}/31744E_2_0.woff2') format('woff2'),url('@{font-dir}/31744E_2_0.woff') format('woff'),url('@{font-dir}/31744E_2_0.ttf') format('truetype');}
@font-face {
    font-family: 'CarFinance';
    src: url('@{font-dir}/CarFinance.eot');
    src: url('@{font-dir}/CarFinance.eot?#iefix') format('embedded-opentype'),
         url('@{font-dir}/CarFinance.woff') format('woff'),
         url('@{font-dir}/CarFinance.ttf') format('truetype'),
         url('@{font-dir}/CarFinance.svg#CarFinance') format('svg');
    font-weight: normal;
    font-style: normal;
}

This is my font in the Folder:

enter image description here

and importing it in my main less file:

@import "fontFamilies.less";
Alma
  • 3,780
  • 11
  • 42
  • 78
  • 1
    Make sure you tag correctly. I was about to downvote as I didn't find `@{font-dir}` to be right. – Praveen Kumar Purushothaman Dec 27 '16 at 23:40
  • 1
    Looks like there's an issue with the `@[font-dir}` variable not inserting a correct path perhaps. ... Based on your image `@font-dir: "../Fonts"` may be correct (case is different) Might need `/fonts` or `../Content/fonts`... hard to tell without knowing the file structure. Might also check url case sensitivity as well. – Scott Dec 27 '16 at 23:49
  • Which server are you using? If it's IIS, then you need to be sure it knows how to handle .woff files. Usually it's necessary to add information about them to Web.config file - http://stackoverflow.com/questions/9021946/add-mime-mapping-in-web-config-for-iis-express – Boris Vaskin Dec 28 '16 at 00:26

0 Answers0