0

I have to use 'helvetica neue' as my asp.net default font. After installed in my pc, I able to add the font into my css, and it is worked while run the web application at local. But after I deployed into server. The 'helvetica neue' font is not working. Is it have to install the font on user computer?

My CSS:

@font-face { font-family: Delicious; src: url('../css/Fonts/HelveticaNeueLTPro-CnO.otf'); } 

body
{
    background: #fff;
    color: #333;
    /*font-family: HelveticaNeueLT Pro 63 MdEx;*/
    font-family: Delicious, sans-serif; 
    font-size: 76%; /* all font sizes are related to this initial 'small' font-size setting (which is more or less 12pt) */
    min-width: 730px; /* min- and max-width don't work in IE Win 6 and below */
    max-width: 1250px;
}
Howard Hee
  • 909
  • 1
  • 13
  • 29

1 Answers1

0

your @font-face is not complete, and you need some more files:

  1. EOT for IE,
  2. SVG fir Ipad,
  3. WOFF for FireFox
  4. TTF/OTF for the rest

You can create those font files at Font Squirrel

@font-face {
 font-family: 'Delicious';
 src: url('../css/Fonts/HelveticaNeueLTPro-CnO.eot');
}

@font-face {
 font-family: 'Delicious';
 src: url(//:) format('no404'), 
 url('../css/Fonts/HelveticaNeueLTPro-CnO.woff') format('woff'), 
 url('../css/Fonts/HelveticaNeueLTPro-CnO.ttf') format('truetype'), 
 url('../css/Fonts/HelveticaNeueLTPro-CnO.svg#Delicious') format('svg');
 font-weight: normal;
 font-style: normal;
}
Mark
  • 6,762
  • 1
  • 33
  • 50
  • I received error, "format('woff'), is not a valid value for 'src' properties".-@Mark – Howard Hee Dec 02 '13 at 08:24
  • Current versions of Firefox use TTF/OTF without any issues - so there's no need for the WOFF. For TTF support generally, see http://caniuse.com/ttf – gzost Dec 02 '13 at 11:04
  • Error Message "Validation (CSS 2.1): 'url('../css/Fonts/HelveticaNeueLTPro-CnO.otf'),' is not a valid value for the 'src' property." I think the issue is because of 'src'.- @gzost – Howard Hee Dec 02 '13 at 11:12