Last active
May 21, 2018 19:53
-
-
Save namklabs/b91c0ac3a052f15080d1336c87c644dc to your computer and use it in GitHub Desktop.
Load Google Fonts before Phaser
This file contains hidden or 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
<head> | |
... | |
<link href="https://fonts.googleapis.com/css?family=VT323" rel="stylesheet"> | |
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script> | |
<script> | |
WebFont.load( { | |
custom: { | |
families: [ 'VT323' ] | |
}, | |
active: function() { | |
//call a function that initializes your phaser game object and starts your game | |
main(); | |
}, | |
} ); | |
</script> | |
... | |
</head> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment