2
votes

I have purchased some fonts from myfonts.com. Due to a bug, they don't work in IE10. I'm gonna use some fallback fonts.

With webfonts, most people use default values for font-weight and font-styles and import different fonts instead. This is a problem now that I want to use fallback default fonts. I want to do somehting like this:

font-family: AvenirLT-BookOblique, Helvetica, Arial;

But setting helvtica and arial to font-style: italic. The default font is already italic. I could make a custom css-file just for IE10, however, that's a bit of a hazzle. Are there any other options? IE10 is the only browser that needs to support this.

1
using browser feature detection is a reliable way to target IE10.Raptor
Consider submitting a bug report to the font vendor if the font does not work on IE 10, instead of creating new problems with browser sniffing.Jukka K. Korpela
Done it already, however, the site goes live and I need to have a solutione in the meantime :)Himmators

1 Answers

0
votes

Demo

You can achieve desired results in IE10 with jQuery(only) or IE conditional Stylesheets for IE<9.

if ($.browser.msie && $.browser.version == 10) {
  $('element').addClass('ie10');
}

.ie10{
    //some css here
}

or target all versions of IE

<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="ie.css" />
<![endif]-->

Note: $.browser.msie is deprecated in jQuery 1.9.1