It would work like normal text object, but would use bitmap fonts instead. User will be able to set via string list of characters in font.
Bitmap fonts would be monospace ones (every character has same size) to simplify life for both extension coder and font maker . User will be able to set height and width (eg. 32x16) of single character in font and provide list of characters (so-called charmaps) so program will know what glyph put on screen when specific character is written in text area part of extension.
So for following font:
charmap AaBbCcDdEe would be valid (there is no need for including space since it’s just empty character and it’s easy to generate). However charmap ABCDEabcde would produce strange results (e.g. “B” instead “a”, etc. - this can be used to include custom glyphs into font).
Why won’t use TTFs instead?
Well, bitmap fonts allows for many cool effects
And I’m not talking about just gradients. First of all, bitmap fonts are substantially easier to make, all you need is some graphic software that supports transparency (Gimp, Paint.net, Photoshop). For making TTF fonts, you need specialized software which is often paid software (notably exception here is FontForge for Linux, but it is hard to use, if you trying it for first time). So with bitmap font, your game may be more original by using font that no game used before, because you just made it! Unless, of course, you’ve ripped font from some old game.
Well, you’re restricted to one font size and color (for latter, maybe extension’s coder may find font coloring alghorithm, because such algorithms do exist), but in exchange you have full control over how you text would look in game.