Update - 22/02/2015: The source code for this project is no longer available. The blog post still remains for people who previously downloaded it.
I’ve posted the source code for my light-weight text rendering library for Direct3D 10. The goal of the “TinyText” library is to provide a quick-to-integrate debug text drawing routine. It was not intended to provide a customer-facing font rendering solution and for this reason, it uses a single embedded font of a single size and has a minimal set of rendering options.
It was designed to be used in situations where you need to print something out to the screen while keeping risk of failure to a minimum. For this reason the single (3kb) font is embedded into the code (so that it doesn’t require any I/O and is not dependant on operating system font support). By default it maintains the original state of the D3D10 device so it should integrate nicely into already established renderers (although this can be turned off if speed is an issue). It doesn’t allocate any memory on the heap, and only ever allocates Direct3D 10 objects via a Direct3D 10 device that you pass it.
Here are some examples of how to use the library:
NOTE: For those that are interested, the embedded font is called “Triskweline” and can be freely downloaded here.