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

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -