Support » Plugin: Typekit Fonts for WordPress » Cannot set ‘async’ to ‘false’!

  • Resolved needmoredesigns

    (@needmoredesigns)



    As Adobe writes, you should be able to set async to false in order to have the “flash of unstyled text” not appear.

    http://blog.typekit.com/2015/08/04/new-embed-code-for-asynchronous-font-loading/

    However, when I try to change the embed code to false, after saving the settings the plugin has changed it back to true!

    I suspect the plugin is trying to save me from doing something wrong here, but this change should be allowed, since as Adobe explains, there is good reason for wanting to change this setting!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author James Collins

    (@jamescollins)

    Hi @needmoredesigns,

    This plugin only supports using the asynchronous tracking code, which doesn’t block the rendering of the page while fonts are loading.

    It doesn’t support using a tracking code where async=false.

    The asyncronouse code is the one that Typekit recommends.

    If you’d like to control how the FOUT displays, I’d suggest reading this article: https://helpx.adobe.com/typekit/using/font-events.html#ControllingtheFlashofUnstyledTextorFOUTusingfontevents . By adding some CSS to your site, you can have full control over how the text displays before the Typekit font(s) are loaded.

    Alternatively, if you would like to use a synchronous tracking code, you would have to use an alternate plugin or solution.

    Thank you for your understanding.

    James

    Thanks very much, I appreciate the reply (and the plugin)!

    I just changed true to false in the source code for now. Something one should never, ever do. 😉

    I would also very much like the option to set async to false. I’m also reduced to editing the plugin source code, which is a terrible solution. Defaulting it to true or showing a warning when you try to set it false seems reasonable, but locking me into async is pushing me away from this plugin.

    Plugin Author James Collins

    (@jamescollins)

    Hi @needmoredesigns & @oscarmondo,

    We have just released a new version of the plugin, which allows you to set async to false.

    If you update to version 1.8.4, you’ll now be able to set async to false without needing to edit the plugin’s source code.

    James

    That’s fantastic! Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cannot set ‘async’ to ‘false’!’ is closed to new replies.