src code

instance method Game#getFont

Game#getFont(relativeUrl[, callback = null]) → Font
  • relativeUrl (String) – A URL relative to the Game#root of a font resource to load.
  • callback (Function) – Optional. A Function to invoke when the font loading process has completed, successfully or not. If an error occured (ex: file not found), an Error object will be passed as the first argument to callback.

A convienience function that returns a new Font, but forcing the URL to be relative to Game#root, instead of the default.