Skip to content

When forced to chose between a FOUC or lagging the page for fonts to load, the answer is 'no.'

License

Notifications You must be signed in to change notification settings

btpoe/typekit-no-fouc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

  1. Add the following script to the head of your site:
<script>
    (function(t,k,f,a,c,e,s){
        t&&(e=k.createElement(f),s=k.getElementsByTagName(a)[0],
        s.parentNode.insertBefore(e,s),e.innerHTML=t.getItem(c))
    })(window.localStorage,document,'style','script','ts.fontFace');
</script>
  1. Run npm install fouckit --save in your project.

  2. Include src/index.js through your preferred method

  • Browserify: require('fouckit');
  • Babel / ES2015: import 'fouckit';
  • Old school: <script src="path/to/files/fouckit/src/index.js"></script>

Enjoy async typekit sans-FOUC!

About

When forced to chose between a FOUC or lagging the page for fonts to load, the answer is 'no.'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published