Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
171 views
in Technique[技术] by (71.8m points)

html - font face not working for IE8 ?? getting @font-face encountered unknown error.?

I am using font face to include a customised font named razing. The font is not working in IE8 but works well on IE9+ and other browsers. I checked the console in IE8 browser and i found " @font-face encountered unknown error." I tried using svg and fixes like ?#iefix but it ain't working. Please can u provide a healthy solution to overcome this, Thanks !!

 <style>
  @font-face {
  font-family: Razing;
  src: url(Fonts/Razing/razing.eot);
  src: url(Fonts/Razing/razing.eot?#iefix) ,
 url(Fonts/Razing/razing.ttf),
 url(Fonts/Razing/razing.woff),
 url(Fonts/Razing/razing.svg) format('svg');

  }
.ABC{ font-family:Razing;font-size:20px;  }
</style>

 <p class="ABC"></p>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Try format('embedded-opentype') at the end of your #iefix line. e.g.

src: url(Fonts/Razing/razing.eot?#iefix) format('embedded-opentype'),

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...