Custom fonts
How to use custom fonts in your WADE apps
Using custom fonts is really easy. All you need is a font in .woff format (compatible with the vast majority of modern browsers). You can load it with wade.loadFont(), and use it normally with your text sprites.
App = function()
{
this.load = function()
{
wade.loadFont('/snippets/samples/Akashi.woff');
};
this.init = function()
{
var textSprite = new TextSprite('Hello World Wide Web', '32px Akashi', 'blue', 'center');
var obj = new SceneObject(textSprite);
wade.addSceneObject(obj);
};
};
Your code was executed successfully!