0

I am using RobotoCondensed downloaded from google Web Fonts. I am using the font from my server. I have created the css like below.

@font-face {
    font-family: 'Roboto Condensed';
    src: url('../fonts/RobotoCondensed-Light.eot');
    src: url('../fonts/RobotoCondensed-Light.eot?#iefix') format('embedded-opentype'), 
         url('../fonts/RobotoCondensed-Light.woff') format('woff'), 
         url('../fonts/RobotoCondensed-Light.ttf')  format('truetype'), 
         url('../fonts/RobotoCondensed-Light.svg#svgFontName') format('svg'); 
    }

All the font types specified are present in the folder that I have specified in the url.

I am using the font family like this

font-family: 'Roboto Condensed', sans-serif;

The things are going smooth with respect to IE9 and Chrome. But when it comes to Mozilla Firefox it is not so.

Except mozilla firefox

Is there any solution for this?

Rohith Gopi
  • 536
  • 1
  • 5
  • 22
  • Consider posting the URL. This would let us see the actual requests for font files and server responses to them. – Jukka K. Korpela Jun 04 '13 at 06:57
  • @JukkaK.Korpela : I have not created any URL for the website. The website is just for a local network. – Rohith Gopi Jun 04 '13 at 07:02
  • 1
    Thanks for everyone's help. The site is working properly when I hosted in IIS. [link](http://stackoverflow.com/questions/14088263/web-fonts-dont-work-in-firefox-on-local-but-do-on-server?rq=1) – Rohith Gopi Jun 04 '13 at 07:09

2 Answers2

1

I'm using the one off the Google Fonts Api and it works in Firefox:

@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto Condensed Regular'), local('RobotoCondensed-Regular'), url(http://themes.googleusercontent.com/static/fonts/robotocondensed/v7/Zd2E9abXLFGSr9G3YK2MsNxB8OB85xaNTJvVSB9YUjQ.woff) format('woff');
}

Maybe try specifying style and weight.

JMParsons
  • 506
  • 2
  • 8
  • 1
    Maybe give this link a look through http://stackoverflow.com/questions/2856502/css-font-face-not-working-with-firefox-but-working-with-chrome-and-ie – JMParsons Jun 04 '13 at 07:27
  • Thank you for the effort. I got the solution. Presently it is working fine when hosted in server. Actually it was a problem. – Rohith Gopi Jun 04 '13 at 07:31
  • I had the same issue but serving from S3 and had to set my headers on the fonts with Access-Control-Allow-Origin = mydomain. If you're serving form your server, then there's a bunch of server snippets like the link posted above. – JMParsons Jul 02 '13 at 23:32
0

just remove : font-weight: 300; from woff