1

I've used the following in the CSS file of the website. It works on safari but not on Firefox. I'm a newbie so apologies for this if it seems like a simple question. Been trying now for 3 hours.

@font-face { font-family: handwriting; src: url(http://example.com/handwriting.ttf); }

Thank you in advance.

user373174
  • 45
  • 1
  • 5
  • Can you post the font styles that use this? – roryf Aug 09 '10 at 10:46
  • "My car doesn't turn left anymore. Here, I've brought the steering wheel for you to look at." Sarcasm aside: There is no point of posting a small (randomly selected) part of your code. You need to show the whole thing in it's (non-)working order. Best is to post an URL, if necessary using a service such as http://jsfiddle.net/ . – RoToRa Aug 09 '10 at 10:48
  • your syntax is correct, but sometimes font files won't work right on some browser or the other (this technique is relatively new) - have you tried with different TTF files? – darma Aug 09 '10 at 10:53

1 Answers1

2

Firefox prevents the loading of fonts served from a different domain unless they are sent with HTTP access control headers.

Use relative paths if you are serving the font from the same domain. If handwriting.ttf was in the same directory as your css file then you would use this:

@font-face { font-family: handwriting; src: url(handwriting.ttf); }
Community
  • 1
  • 1
Chris_O
  • 3,429
  • 1
  • 22
  • 28