How to load external fonts via javascript before page ready -


i'm using typekit on website load fonts , typekit gives me 2 links.

<script src="https://use.typekit.net/xxxx.js"></script> <script>try { typekit.load({ async: false }); } catch (e) { }</script> 

i put these links in head tag when enter website fonts loaded after content. wonder how can load before page ready or before content load.

ps: tried async: true , false.. both of them gave same result.

one thing can use font evens hide content while fonts load. https://helpx.adobe.com/typekit/using/font-events.html


Comments

Popular posts from this blog

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -