typeface.js
User / Developer Forum
fonts dont show in IE
hitzli
|
8 Mar 2010 9:55
i really like your script and it works fine in FF, but for me it doesnt in IE.
http://www.hofgut-ebling.de/neu/index.html
i would be really glad if you could tell me, what i did wrong!!

anna
Mick Byrne
|
29 Mar 2010 18:36
Check your version! I've had this problem (twice) and both times was resolved by re-converting my font and downloading the latest .js file from the typeface website. Hope it's as simple as that. Good luck.
Ryan Brennan
|
23 Apr 2010 11:14
Hey

I was having the same problem, so looking in the typeface.js file i found this:


=========================
// IE won't accept real selectors...
var typefaceSelectors = ['.typeface-js', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];

if (document.createStyleSheet) { 

var styleSheet = document.createStyleSheet();
for (var i = 0; i < typefaceSelectors.length; i++) {
  var selector = typefaceSelectors[i];
  styleSheet.addRule(selector, 'visibility: hidden');
}
==========================

By changing the html i managed to get it to work both in IE8 and FF3:

<div class="typeface-js .typeface-js otherclasses">
      Test here..
</div>

I called the classes "typeface-js" as normal, but also ".typeface-js" which isn't mentioned in any examples (note the period ".")

Hope this helps, maybe someone with a better understanding of javascript could help to eliminate the problem instead of using this work-around
Post a Reply
YOUR NAME
YOUR COMMENT
We don't support HTML, but please use [quote] ... [/quote] tags around quotes.