How about the PBM tools? Free with every order of Linux, should be available for everything else.
pbmtext looks promising, though font selection is limited.
You might also look into SVG, though I dunno if you can stick bitmaps inside.
Also, (since you mentioned Java) you could just write some custom code to do the job. Bitmap libs are available for lots of formats, and Java2D does beautiful drawing.