Monthly Archives: April 2012

IronXNA – Bordered SpriteFont

I’ve been messing with XNA lately, which has been quite awesome. One of the things that I felt was missing with the built in SpriteFont was the ability to render SpriteFonts with borders (or outlines, whatever you want to call them).

My Google-Fu turned up nothing, so I wrote my own implementation based on the Text Renderer I’d written for internal Ironshod usage.

I’ve released it on Github here for everyones enjoyment:

Beautiful Example:

When drawing text, both the inner and outer color can be changed.

It tries hard to draw text with the same spacing as SpriteFont, but it doesn’t always achieve it.