Skip to content

Instantly share code, notes, and snippets.

@namklabs
Last active May 21, 2018 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save namklabs/b91c0ac3a052f15080d1336c87c644dc to your computer and use it in GitHub Desktop.
Save namklabs/b91c0ac3a052f15080d1336c87c644dc to your computer and use it in GitHub Desktop.
Load Google Fonts before Phaser
<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