• 0

IE not seeing @font-face in Wordpress


Question

I'm designing a blog for a website and for some reason IE can't see the font-face in my css style sheet. Chrome, Safari and Firefox see the font-face fine but not for IE. What I'm I doing wrong?

Works fine if it's not in wordpress, aka XHTML or HTML5!


@font-face {
font-family: 'Book';
src: url('f/book-webfont.eot');
src: url('f/book-webfont.eot?#iefix') format('embedded-opentype'),
url('f/book-webfont.woff') format('woff'),
url('f/book-webfont.ttf') format('truetype'),
url('f/book-webfont.svg#AGBookRegular') format('svg');
font-weight: normal;
font-style: normal;
}
------------------

.widget h2 {
color: #333;
font: 22px 'Book', Helvetica, sans-serif;
margin:0 0 6px 0;
}

[/CODE]

10 answers to this question

Recommended Posts

  • 0

I think it's trying to load the second line also, and failing. Remove the first like and separate the hacks out....

this works for me at http://www.nationwide.co.uk


@font-face{
font-family:nbsBold;
src:url(/_/fonts/nbs-bold-webfont.eot?#ieNo404) format("eot");
src:local("?"),url(/_/fonts/nbs-bold-webfont.woff) format("woff"),url(/_/fonts/nbs-bold-webfont.ttf) format("truetype");
}
[/CODE]

  • 0

local("?")

You shouldn't need that, in fact all it will do is slightly slow down the resolution process. If you don't want to load a font from the local system simply leave out the local() declaration, don't give it invalid data.

That's so that IE6+ doesn't follow that line. IE should just obey the first line and then stop at the #.

Even the generator code didn't work for me, I did a bit of trial and error.

  • 0

IE6 doesn't support anything other than src: url();, even including a format() parameter breaks it (And it only ever uses 1 src:; property, the first one)

Exactly, IE will try and use the Woff file if I don't hack that line with a local src. (and then break). I didn't just put it there for fun.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.