Welcome Guest! To access all forums & features, please register an account or sign-in. → Why register?



IE not seeing @font-face in Wordpress


10 replies to this topic - - - - -

#1 ACTIONpack

    Graphic Designer

  • 1,665 posts
  • Joined: 10-August 03
  • Location: Lawrenceville, GA
  • OS: Windows 8 Pro
  • Phone: HTC Windows 8X

Posted 28 June 2012 - 19:48

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;
}




#2 Mr.XXIV

    Shine bright like Iron Man.

  • 1,182 posts
  • Joined: 30-April 11
  • Location: Stratford, Connecticut
  • OS: OS X Mountain Lion 10.8.2
  • Phone: iPhone 4

Posted 02 July 2012 - 00:29

Which version of IE?

#3 The_Decryptor

    THE ALPHA CEPH!

  • 18,355 posts
  • Joined: 28-September 02
  • Location: Sol System
  • OS: WinLin X 10.9 Ill-tempered Badger

Posted 02 July 2012 - 10:19

Does the eot file exist? Does it work if you remove the "iefix" stuff? (So it'll use the WOFF version)

#4 threetonesun

    Neowinian ULTRAKILL

  • 11,301 posts
  • Joined: 26-February 02

Posted 02 July 2012 - 12:24

Did you use Firebug or Chrome inspector on it? It must be getting assigned a font from somewhere else.

Also, are you loading an IE-specific stylesheet that might override this after base css file?

#5 lunamonkey

    (Almost) Ten years old.

  • 8,885 posts
  • Joined: 28-May 03
  • Location: Swindon, England

Posted 02 July 2012 - 12:40

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");
}


#6 The_Decryptor

    THE ALPHA CEPH!

  • 18,355 posts
  • Joined: 28-September 02
  • Location: Sol System
  • OS: WinLin X 10.9 Ill-tempered Badger

Posted 03 July 2012 - 01:06

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.

#7 primexx

    Neowinian ULTRAKILL

  • 12,021 posts
  • Joined: 24-April 05

Posted 03 July 2012 - 02:14

http://www.fontsquir...tface/generator

#8 lunamonkey

    (Almost) Ten years old.

  • 8,885 posts
  • Joined: 28-May 03
  • Location: Swindon, England

Posted 03 July 2012 - 11:57

View PostThe_Decryptor, on 03 July 2012 - 01:06, said:

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.

#9 The_Decryptor

    THE ALPHA CEPH!

  • 18,355 posts
  • Joined: 28-September 02
  • Location: Sol System
  • OS: WinLin X 10.9 Ill-tempered Badger

Posted 03 July 2012 - 23:05

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)

#10 primexx

    Neowinian ULTRAKILL

  • 12,021 posts
  • Joined: 24-April 05

Posted 04 July 2012 - 03:20

the fontsquirrel generator's code works perfectly for me in IE9

#11 lunamonkey

    (Almost) Ten years old.

  • 8,885 posts
  • Joined: 28-May 03
  • Location: Swindon, England

Posted 04 July 2012 - 11:56

View PostThe_Decryptor, on 03 July 2012 - 23:05, said:

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.