0

Typekit servers experiencing an outage in Australia at the moment. And it has exposed an issue with a site of mine which uses Google's Webfont Loader to load Typekit fonts.

I was under the impression that there would eventually be a timeout and the font loader would go into an inactive state (ie wf-inactive) if the Webfont Loader isn't able to load a font but it appears to hang indefinitely on wf-loading.

To prevent FOUT, I have visibility: hidden; set for all elements using these web fonts. So the problem is that all the text remains hidden indefinitely.

Would greatly appreciate any ideas how to work around it? I can't see anything in Google's Webfont Loader documentation regarding timeouts.

Prembo
  • 2,256
  • 2
  • 30
  • 50

1 Answers1

0

If you are using the advance setting, you can set the sections that have the visibility : hidden css to visible via the inactive function of typekit:

 Typekit.load({
      loading: function() {
         //Javascript to execute when fonts start loading

      },
     active: function() {


    },
    inactive: function() {
      // Javascript to execute when fonts become inactive
      $("#page).css("visibility", "visible") // check the correct script for that 
    }
  })
Mor
  • 1
  • 2
    It appears that the Web Font Loader never went into the "inactive" state in this instance. It remained indefinitely in the "loading" state. So the "inactive" JS event handler wouldn't have been executed either... (that was with v1.0.17) – Prembo Aug 26 '12 at 21:40