Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

@font-face for IE ?

Status
Not open for further replies.

MrMiyagi

Technical User
Feb 11, 2009
43
FI
Hi,

I have a question about the @font-face feature. I have it working fine in firefox, but there is a problem with IE.

This is how its supposed to work in IE:

<!--[if IE]>
<style type="text/css" media="screen">
@font-face{
font-family:'font1';
src: url('../fonts/font1.eot');
}
</style>
<![endif]-->

I got it working with one font but the problem is that I need to embed 3 fonts. For other browsers this work:

@font-face{
font-family:'font1';
src: url('../fonts/font1.otf') format('opentype');
}

@font-face{
font-family:'font2';
src: url('../fonts/font2.otf') format('opentype');
}

@font-face{
font-family:'font3';
src: url('../fonts/font3.otf') format('opentype');
}



For IE, I tried the following:

<!--[if IE]>
<style type="text/css" media="screen">

@font-face{
font-family:'font1';
src: url('../fonts/font1.eot');
}

@font-face{
font-family:'font2';
src: url('../fonts/font2.eot');
}

@font-face{
font-family:'font3';
src: url('../fonts/font3.eot');
}

</style>
<![endif]-->

But this does not work. I have all fonts in otf & eot format. So my question is:

How to embedd more than 1 font so that it also works in IE?










 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top