XTerm – How to Find Default Font Resource

defaultsfontsx-resourcesx11xterm

If I launch xterm with its default bitmap fonts and then select the 'Large' font from the 'VT Fonts' menu (via ctrl+right mouse), I get a very usable bitmap font with apparently good Japanese character support.

I'd like to know what this font is so that I can use it elsewhere. Unfortunately, I've found no information on what default settings XTerm uses (i.e. when none are explicitly specified). Lots of sites show how to use X resources to specify new settings (e.g. particular fonts), but none I've seen say what defaults are used if I do nothing.

I've tried eyeballing the font, and it looks similar to and is the same width as 9x15, but it uses more vertical space. It appears not to be 9x15 with different line spacing, though, as specifying this font directly fails to display some Japanese characters that 'Large' can handle just fine.

Although I'll be happy to know what this specific font is, I really want to know where to find what defaults XTerm uses for its resources more generally. If it makes any difference, I'm running Ubuntu 12.04 LTS, 64-bit.

[I have seen this question on the subject already, which is why I'm specifically asking about defaults rather than trying to get live values from a running XTerm.]

Best Answer

The appres utility lists the resources used by an application, both user and default.

appres XTerm xterm

The first argument is the class name (xterm -class Xxx). The second argument, which is optional, is the instance name (xterm -name xxx).

The “Large” font is .VT100.font5 or .VT100.utf8Fonts.font5. See the manual for whether .utf8Fonts is used, it's a bit complex. If you have more than one among *.VT100.font5 and ?.VT100.font5 and XTerm.VT100.font5 and xterm.VT100.font5, the last one in this list applies; see the X documentation for the gory details of resource name precedence.

appres XTerm | grep font5
Related Question