@font-face not embedding in IE8 and under

2019-08-07 19:30发布

问题:

for some reason the font is not rendering in IE 8 and under. I've applied the IE fix (.eot?#iefix) which always has worked but for some reason it's not this time. Anybody know what's going wrong or have had an issue like this as well? Here's what I have:

@font-face {
font-family: 'rrb-main';
src: url('./assets/rrb-main.eot');
src: url('./assets/rrb-main.eot?#iefix') format('embedded-opentype'),
         url('./assets/rrb-main.woff') format('woff'),
         url('./assets/rrb-main.ttf') format('truetype');
font-weight: normal;
font-style: normal;

}

回答1:

Try using double quotes around your tags like so:

@font-face {
font-family: "rrb-main";
src: url("./assets/rrb-main.eot");
src: url("./assets/rrb-main.eot?#iefix") format("embedded-opentype"),
     url("./assets/rrb-main.woff") format("woff"),
     url("./assets/rrb-main.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}

I don't know why but sometimes that works. This tag should work since you have the EOT version of the font.



标签: font-face