5

I bind some type for my site:

@font-face {
font-family:WILLS;
src:url(WILLS.TTF);
}

In most browsers this types recognize perfectly but IE don't see this type because of ttf extensions. But the problem is that IE10+ aren't support this condition.

<!--[if IE]>...<![endif]-->

Is there any way to make specific css code for IE10 to change type to usuall, for example Tahoma or times and ofcourse change font-size?

Sevar
  • 91
  • 5
  • 3
    possible duplicate of [How do I target only Internet Explorer 10 for certain situations like Internet Explorer-specific CSS or Internet Explorer-specific JavaScript code?](http://stackoverflow.com/questions/9900311/how-do-i-target-only-internet-explorer-10-for-certain-situations-like-internet-e) – falinsky Oct 24 '13 at 10:24
  • found good decision for this issue, any css would be specific for IE9,IE10 - @media screen and (min-width:0\0) { css code for ie9,10}. And converting ttf to eot and adding url(WILLS.EOT) won't help – Sevar Oct 24 '13 at 10:38
  • so \0 is for 10 ? and i thought it would be \9 for 19 – Deepanshu Goyal Oct 24 '13 at 10:45
  • @Sevar well out of my curiosity I want to know is \0 for IE10 ? – Deepanshu Goyal Oct 24 '13 at 10:57
  • this specific css code @media screen and (min-width:0\0) {} works only with IE10 and IE9. I was checked now in IE9,10 – Sevar Oct 24 '13 at 11:14
  • Why would eot not help you? – Anselm Oct 24 '13 at 11:30
  • @Sevar could you please comment on the specific answers if anything suggested did not work? This makes the whole clearer to people trying to come up with suggestions! – sg3s Oct 24 '13 at 11:50
  • CSS codes For IE7 only - * *font-family:WILLS; For IE8 only - _ _font-family:WILLS; For IE9 only - \9 font-family:WILLS\9; For IE10 only - \0 font-family:WILLS\0; – Deepanshu Goyal Oct 25 '13 at 05:16
  • @sg3s the suggestions about converting .ttf extension to .eot and adding url(WILLS.EOT); won't help, IE9,10 can't see this maybe because this type can't be clearly converted to eot, I don't know – Sevar Oct 25 '13 at 12:14
  • @sg3s converted this font using link you provide and all works perfectly in IE9,10 , thanks for this generator, it's very useful! – Sevar Oct 25 '13 at 12:32
  • @Sevar I was about to say! I just was just about to post screenshot proof that my generator answer would work out :p Don't forget to accept an answer if your question is answered ;) – sg3s Oct 25 '13 at 12:35

2 Answers2

6

You will need to specify a EOT file for IE9+ and a TTF file for <= IE8

@font-face {
font-family:WILLS,
src:url(WILLS.TTF),
url(WILLS.EOT); /* IE9+ */
}

If you convert the TTF file to an EOT file and upload both files. IE9 and above will use the EOT file

Liam Sorsby
  • 2,912
  • 3
  • 28
  • 51
1

I would suggest you look into a webfont generator. It will give you the font types you need to also support IE10 and will make css code which ensures best support cross-platform.

Font Squirrel is the most used/popular out there but there are more

http://www.fontsquirrel.com/tools/webfont-generator

sg3s
  • 9,411
  • 3
  • 36
  • 52