Jump to content

Google web fonts


KnTproject
 Share

Recommended Posts

Assuming you've loaded the font in the loader (line 21)... the Google web font loader looks for a global object called "WebFontConfig". One of the properties of that object is a method called "active". The Google font loader will call that method if you've defined it. What this particular "active" does is wait one second (i.e. game.time.events.add(Phaser.Timer.SECOND, ...);) and then call the method "createText".

AFAIK, it's that one second wait that's key. Without it the fonts won't display when used in your game.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...