Jump to content

Simonnice

Members
  • Content Count

    5
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Simonnice reacted to Jem Kazama in Webfonts not working   
    I've heard that sometimes you have to use the font somewhere before it renders properly in phaser. Maybe try something like this?

     
    <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Tangerine"> <style type="text/css"> body{ font-family: 'Tangerine'; font-size: 32px; background: #ffffff; padding:px; margin:px; } .fontPreload { font-family: 'Tangerine'; position:absolute; left:-100px; } </style> <script src="phaser.min.js"></script> <script src = "js/preload.js"></script> <script src = "js/intro.js"></script> <script src = "js/office.js"></script> </head> <body> <div class="fontPreload">.</div> <script type="text/javascript"> var game = new Phaser.Game(960, 540, 'PHASER.WEBGL'); game.state.add('Preload', MyGame.preload) game.state.add('Intro', MyGame.intro); game.state.add('Office', MyGame.office); game.state.start('Preload'); </script> </body> </html>  
×
×
  • Create New...