Typekit requires us to include their JS file to render the fonts, e.g.:
<script type="text/javascript" src="https://use.typekit.com/random-name.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
I have noticed there has been a few instances where their server is slow to response, which caused the page to halt. Unfortunately, some people have had similar experience.
I tried to host the JS file locally and it seemed to work.
<script type="text/javascript" src="http://use.typekit.com/random-name.js"></script>
<script type="text/javascript">window.Typekit || document.write('<script type="text/javascript" src="/scripts/js/ext/random-name.js">\x3C/script>')</script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
My questions:
Thank you.
Related:
For this, and to eliminate flashes of unstyled text, I implemented a simple script that caches Typekits in localStorage: https://github.com/morris/typekit-cache - maybe this helps future typekit users running into the same problems.
This code runs fine on Firefox, but I can't make the unload event work on Chrome anymore. Did Chrome stop supporting the unload event? This is my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1....
This code runs fine on Firefox, but I can't make the unload event work on Chrome anymore. Did Chrome stop supporting the unload event? This is my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1....
Can you help me please to consider where to place resource (service) specific business logic in AngularJS. I feel it should be great to create some model-like abstraction over my resource, but I'm not ...
Can you help me please to consider where to place resource (service) specific business logic in AngularJS. I feel it should be great to create some model-like abstraction over my resource, but I'm not ...
I'm using sinon.js as a way to stub out dependencies in my Mocha tests. I prefer the 'spy' approach over a classic mock approach, as the introspection of the spy seems clearer and affords more ...
I'm using sinon.js as a way to stub out dependencies in my Mocha tests. I prefer the 'spy' approach over a classic mock approach, as the introspection of the spy seems clearer and affords more ...
I get the following error "Web Service method name is not valid" when i try to call webmethod from javascript System.InvalidOperationException: SaveBOAT Web Service method name is not valid. ...
I get the following error "Web Service method name is not valid" when i try to call webmethod from javascript System.InvalidOperationException: SaveBOAT Web Service method name is not valid. ...