shinshin5252 / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

Issues with FontAwesome #394

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use FontAwesome: http://fontawesome.io/icons/
2. Or just use this css style: .icon:before { content: "\f073"; }

in case of the use of font awseome it should display an icon. but it shows the 
string "f073" instead

I'm using ie7-2.1(beta4)

Original issue reported on code.google.com by samuel.s...@gmail.com on 25 Oct 2013 at 12:51

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Did you find a solution?

I am having a similar issue with my icon fonts. Instead of rendering the icon 
it renders a square.

I am using IE9.js Version 2.1 (beta4) in Win XP - IE8

Any suggestion?

Cheers

Original comment by laura.s....@gmail.com on 12 Feb 2014 at 4:08

GoogleCodeExporter commented 8 years ago
It seems that the JS is removing the leading "\" that signifies a unicode 
character in the CSS.  If you add that back into the content: "" property in 
the CSS, it works.  The JS needs to make sure it's not removing leading or 
trailing slashes from places where they're actually required.

Original comment by dpkon...@gmail.com on 3 Jun 2014 at 8:01

GoogleCodeExporter commented 8 years ago
i solved this for me with a quick hack by adding a line of code to my IE9.js:

  load: function() {
    this.cssText = "";
    this.getText();
    this.parse();
    if (inheritedProperties.length) {
      this.cssText = parseInherited(this.cssText);
    }
    this.cssText = decode(this.cssText);

    // preserve fontawesome-classes (werkzeugh@gmail.com 2014-06-04)
    this.cssText=this.cssText.replace(/content: 'f([a-f0-9]+)';/g,'content: "\\f$1";');

    fileCache = {};
  },

Original comment by werkze...@gmail.com on 4 Jun 2014 at 8:23