Kristie Matthew Kristie Matthew - 9 months ago 114
CSS Question

Font-face not working in IE, otf font

I know this was asked multiple times, but I couldn't get it to work after trying them. This is the simple CSS I am using to import a custom font. Also, I am using this with bootstrap.

@font-face {
font-family: Montserrat-Black;
src: url(Montserrat-Black.otf);

It's not working in IE11 itself. Please help me out. Thank you.


Internet explorer use eot format (legacy) or woff. See MSDN

Aniway i use this code for maximum compatibility:

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */