I want something that runs on my computer that somehow interrogates X and tells me exactly the font, not a guess.
I don't think there is a general solution. Once the text has been rendered, there's no reason why any component of the system would have kept the information of what font it was rendered from around. So you'll have to somehow watch when the program renders the text. In any case, how to get at the information depends on the rendering engine.
Most programs render through the fontconfig library. If you start a fontconfig-using program with the
FC_DEBUG environment variable set to a suitable value, it will show some information about fonts being loaded, though not what font is being used for rendering which text. Still, try running
FC_DEBUG=2053 myprogram. See
/usr/share/doc/fontconfig/fontconfig-user.txt.gz for the meaning of
Traditional unix programs render text using bitmap fonts managed by the X server. Then you could see what font was used to render what text by spying on the X protocol conversation and watching for
ImageText and a few other messages. I don't have ready-for-use tools to suggest.
If you're only interested in a particular application, there may be a better way that's specific to that application.
A great resource for identifying fonts is here: