mark
mark

Reputation: 5070

Icon Font causes Compatibility Mode in IE8

I'm having a problem where icon fonts are causing IE8 to go into Compatibility Mode. And correspondingly, if IE8 is forced into Edge mode (eg. via <meta http-equiv="X-UA-Compatible" content="IE=edge" />) then IE will crash.

Specifically, I have a custom icon font that I'm using, and it's currently mapped to the unicode Private Use Area of the Basic Multilingual Plane. The font starts at \f000 and goes up to around \f360.

I found a couple articles that suggest that assigning to the unicode Private Use Area is the problem:

Things that I've tried to fix it:

Neither of these solutions works though, IE8 continues to crash and/or go into compatibility mode. I haven't yet tried limiting the font to strictly the Basic Latin range because I have too many glyphs to fit in the 127 available spots.

I've also been able to get both FontAwesome and Glyphicons to crash IE8, also it seems to happen less frequently than with my font. Most of the time the initial page load will work, and then hitting refresh will cause the problem.

Anyone have any other ideas on what I can do?

PS: I'm not concerned about other IE8 CSS @font-face issues, like those discussed here IE8 CSS @font-face fonts only working for :before content on over and sometimes on refresh/hard refresh. I've already applied the techniques there to solve those issues.

Upvotes: 2

Views: 612

Answers (1)

mark
mark

Reputation: 5070

Long story short, there are two ways to solve this:

  • assign to the Basic Latin Range : U+0020 to U+007F
  • assign to the Low Surrogates Range : U+DC00 to U+DFFF

I found this through unit testing various ranges with my custom icon font using a grunt-webfont build process. I didn't exhaustively test every range, but I found these two to work, and to be sufficient.

Notes: The Basic Latin Range starts from U+0020 not U+0000. The Low Surrogates Range has a larger address space, and so is preferrable if you have a lot of glyphs. It also has the advantage of rendering square boxes if the glyph fails to load, as opposed to assorted Latin characters as the Basic Latin Range does.

Upvotes: 1

Related Questions