Created
July 19, 2017 10:27
-
-
Save maxmonax/03ee1b580d6a5aa0d2b20c26bf2e08be to your computer and use it in GitHub Desktop.
Using web fonts in Phaser
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="pragma" content="no-cache" /> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> | |
<title>Game</title> | |
<style> | |
@font-face { | |
font-family: VAGzStarBold; | |
src: url('global/fonts/vrzb.eot'); | |
src: url('global/fonts/vrzb.eot?#iefix') format('eot'), | |
url('global/fonts/vrzb.woff') format('woff'), | |
url('global/fonts/vrzb.ttf') format('truetype'), | |
url('global/fonts/vrzb.svg') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: VAGzStarLight; | |
src: url('global/fonts/vrzl.eot'); | |
src: url('global/fonts/vrzl.eot?#iefix') format('eot'), | |
url('global/fonts/vrzl.woff') format('woff'), | |
url('global/fonts/vrzl.ttf') format('truetype'), | |
url('global/fonts/vrzl.svg') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: VAGzStarThin; | |
src: url('global/fonts/vrzt.eot'); | |
src: url('global/fonts/vrzt.eot?#iefix') format('eot'), | |
url('global/fonts/vrzt.woff') format('woff'), | |
url('global/fonts/vrzt.ttf') format('truetype'), | |
url('global/fonts/vrzt.svg') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
html { | |
overflow: hidden; | |
} | |
body { | |
background-color: #625CF2; | |
font-family: 'Segoe UI', sans-serif; | |
border: none; | |
padding: 0; | |
margin: 0; | |
} | |
#game { | |
margin: 0; | |
padding: 0; | |
} | |
</style> | |
<script src="global/js/phaser.min.js"></script> | |
<script src="game.js"></script> | |
</head> | |
<body> | |
<div class="font_preload hidden"> | |
<span style="font-family: VAGzStarBold;"></span> | |
<span style="font-family: VAGzStarLight;"></span> | |
<span style="font-family: VAGzStarThin;"></span> | |
</div> | |
<div id="game"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment