Freetype fonts
You can not only use bitmap fonts but often there are also nicer 'freetype' fonts in xterm
xterm -fa default -fs 13
So if you put a shellscript with a content similar to the above command line in PATH before the executable file /usr/bin/xterm, for example in /usr/local/bin, we can hope that your tool will pick it up and provide a better font and size.
From man xterm:
-fa pattern
This option sets the pattern for fonts selected from the
FreeType library if support for that library was compiled into
xterm. This corresponds to the faceName resource. When a CJK
double-width font is specified, you also need to turn on the
cjkWidth resource.
-fs size
This option sets the pointsize for fonts selected from the
FreeType library if support for that library was compiled into
xterm. This corresponds to the faceSize resource.
Otherwise you might be able to use the resources faceName and faceSize. (I have never done that. You can try according to the advice in the accepted answer to this AskUbuntu question.)
Edit: How to select font and size interactively
So there's no way to change the font of xterm once it's running, you have
to do it when it is launched? I'm doing this in a docker image so it's a
little convoluted to create that script to intercept the xterm command
that is offered when I click on the "desktop".
Is that customizable at all?
Yes, you can modify the font and size interactively:
- Put the cursor into the
xterm window's main area.
- Press ctrl and right-click to get a pop-up window
- Move the cursor to select 'freetype' or if installed 'truetype'
- Move the cursor to select the size you want
You will see tick marks at the selected options.
