0

I used the following code to embed the fonts in my website. This font works fine online and offline in Chrome and Firefox. But it doesn't appear in Internet Explorer when I upload the site.

Is there any setting that I'm supposed to do on my hosting site or is there any specific settings regarding character set?

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

<style type="text/css"> 
@font-face
{
font-family:GothamBook;
src:url('fonts/gothambook.eot');
src:url('fonts/gothambook.eot?#iefix') format('embedded-opentype'),
        url('fonts/gothambook.woff') format('woff'),
        url('fonts/gothambook.ttf') format('truetype'),
        url('fonts/gothambook.svg#svg/gothambook') format('svg')

}
</style>
</head>

please help me i want to make this code work in Internet explorer.

Pavlo
  • 43,301
  • 14
  • 77
  • 113
user2034961
  • 23
  • 1
  • 5
  • http://stackoverflow.com/questions/1753838/internet-explorer-font-face-is-failing – m.spyratos Feb 02 '13 at 10:07
  • 1
    @MikeSpy No, this is definitely a different problem. The syntax looks ok, I think problem might be in Apache config. – Pavlo Feb 02 '13 at 10:09
  • I didn't say that it is a duplicate. I just wanted you to try the font squirrel: http://www.fontsquirrel.com/fontface/generator – m.spyratos Feb 02 '13 at 10:16
  • @MikeSpy You are leading the wrong way. This syntax is known as ["the new booletproof"](http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax), I believe Font Squirell uses the same. – Pavlo Feb 02 '13 at 10:35

2 Answers2

1

Try adding

AddType application/vnd.ms-fontobject .eot

to your .htaccess file

easwee
  • 15,757
  • 24
  • 60
  • 83
  • i don't know where .htaccess file is located and how to configure it..can you please help me to find it or if i need to create it than how can i create it.? i hope the solution you gave may work..because i checked out the synatax and other thigs everything is fine and the site fonts gets embedded in chrome , and safari and other browser but i am getting problem with IE only that the fonts are not working and i am also having problem with layout , that elements in the page move slit from its original place. – user2034961 Feb 04 '13 at 05:52
  • It should be located in the www root folder on the server if you are running on apache.If you are running MS add it to your webconfig. – easwee Feb 04 '13 at 08:41
0

This is most probably a cross-site access issue that requires settings in the server hosting the fonts: Access-Control-Allow-Origin header needs to be set to allow access from a different domain. See How to add an Access-Control-Allow-Origin header.

Community
  • 1
  • 1
Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390