How do I render a string in an ancient X11 bitmap font? I mean something like
-*-lucida-medium-r-normal-*-34-*-*-*-*-*-*-*
which I can find with xfontsel. I just need a command line tool etc. that displays a given string in that font. A similar TrueType font won’t work, since it has to be pixel-perfect (I’m trying to get images of each letter to OCR an image in that font).
I’m not sure if there is a command line tool. But you can always roll your own with Xlib and C.
Somebody seems to have written a simple X11 C program that displays a string using Xlib. Changing a couple of lines and compiling with:
.. should do it for you.
I’ve reproduced the entire program in this gist (in case it vanishes from the original source), modified to take two arguments: 1. fontname, 2. string to be rendered.
So you’d call it like (after compiling of course):