THIS PLUGIN IS OBSOLETE!
Since Impact 1.20 letterSpacing and lineSpacing properties were added for fonts. This two properties are making the same thing like my plugin and they make it better.
So I deleted the outlinedfont.js
and this repo is here only to get the outlined font and for information.
Example
How to use it
- Put the
outlinedfont.png
in yourmedia/
directory. - In your game class:
...
MyGame = ig.Game.extend({
// Load a font
font: new ig.Font( 'media/outlinedfont.png' ),
init: function() {
// Here we set the properties of the font, so that it behaves like a normal one
this.font.letterSpacing = -1;
this.font.lineSpacing = -2;
},
...
draw: function() {
this.parent();
// Add your own drawing code here
var x = ig.system.width/2,
y = ig.system.height/2;
this.font.draw( 'It Works!', x, y, ig.Font.ALIGN.CENTER );
}
});
...