impact-font-sugar
impact-font-sugar copied to clipboard
On-the-fly colors and borders for ImpactJS fonts
Summary
This ImpactJS plugin allows you to customize your fonts. Add borders. Change the color. It can even change specific words or characters on-the-fly.


Installation
- Put plugin here:
/lib/plugins/font-sugar.js - Require
'plugins.font-sugar'.
Examples
Add a black border to a font.
var font = new ig.Font('media/font.png', { borderColor: '#000' });
Set thickness of that border.
var font = new ig.Font('media/font.png', { borderColor: '#000', borderSize: 2 });
Change the color of a font.
var font = new ig.Font('media/font.png', { fontColor: '#F00' });
Other options can also be set this way.
var font = new ig.Font('media/font.png', { letterSpacing: 1 });
Set a different color for a specific word.

font.draw("The [#000000 quick] brown fox", x, y);