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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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