###Benefits
- Displays text after html is loaded
- Get rid of FOIT
##Installation
###Step 1: Link plugins file
<script src="/js/fontfaceobserver.js"></script>
<script src="/js/fontsloader.js"></script>###Step 2: Set up css styles
body {
font-family: 'Arial';
}
.fonts-loaded body {
font-family: 'Open Sans';
}
.fonts-loaded .special {
font-family: 'Roboto'
}###Step 3: Call function in javascript
$(document).ready(function(){
$('html').fontLoader({
fonts: {
'Open Sans': [200, 400, 600, 700],
'Roboto': [100, 300, 400]
},
fontLoadedClass: 'fonts-loaded'
});
});DOC for @pagepro users Presentation
##Configuration options
fonts Objects with font family names as key and array of weights as value
default: 'Arial': [400]
options: fonts
fontLoadedClass Fonts Loaded Class name
default: 'fonts-loaded'
options: class name
##Licenses
FontFaceObserver
Copyright 2014-2015 Bram Stein.