Last active
November 26, 2016 10:34
-
-
Save sky4git/045c6ab1885a202382ced8ff094fd919 to your computer and use it in GitHub Desktop.
Web Font Loader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------- Example 1 for Google Fonts ---------------------------------- | |
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js"></script> | |
<script> | |
WebFont.load({ | |
google: { | |
families: ['Droid Sans', 'Droid Serif'] | |
} | |
}); | |
</script> | |
------------- Example 2 for Typekit------------------------------------ | |
<script> | |
WebFontConfig = { | |
typekit: { id: 'xxxxxx' } | |
}; | |
(function(d) { | |
var wf = d.createElement('script'), s = d.scripts[0]; | |
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js'; | |
s.parentNode.insertBefore(wf, s); | |
})(document); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment