3

In xterm, I would like to increase the default font size to the font5/Font5/"Large" option of the default VTFont. I've managed to do this manually with my mouse via the control menu so far, which is brilliant, but it can become quite a burden whenever I open a new xterm window. Hence, I would like to achieve the same by setting it as my default in my .Xresources file, so that every new xterm window opens in the "Large" font size by default instead of using the control menu.

Reading the man page and doing some further research online, I tried, in separate attempts: xterm*font: font5, xterm*font: *-fixed-*-*-*-18-* and xterm*faceSize: 12.0 to achieve a similar outcome. Whilst the first try didn't work at all, in the latter two, the font is indeed increased but rather blurred when compared with what I can achieve through the control menu option. Surely, there must be a way!

Edit: I have found a second way of increasing, decreasing and resetting the size of the default VTFont via Ctrl+plus/Ctrl+minus/Ctrl+0:

xterm*VT100.Translations: #override \
    Ctrl <Key> minus: smaller-vt-font() \n\
    Ctrl <Key> plus: larger-vt-font() \n\
    Ctrl <Key> 0: set-vt-font(d)

However, this method still requires manual handling every time I open a new xterm window. The search continues . . .

2
  • I suggest that you try one of the alternatives shown in this link. Either use a free-type font via alias or use the .Xresources file to set the fixed font (or a free-type font).
    – sudodus
    Oct 27, 2021 at 14:24
  • Thanks @sudodus, I've tried both alternatives. The free-type example works, but I would prefer to keep the default fixed VTFont and 'MiscFixed' doesn't seem to be a recognised value.
    – TeXomat
    Oct 27, 2021 at 22:20

1 Answer 1

1

You can use the initialFont resource to do this:

   initialFont (class InitialFont)
           Specifies which of the VT100 fonts to use initially.  Values
           are the same as for the set-vt-font action.  The default is
           "d", i.e., "default".

e.g.,

xterm*VT100.initialFont: 5
1
  • You can also test this out, before modifying your .Xresources file, using the -xrm option: xterm -xrm 'xterm*VT100.initialFont:5'. And merge them in via xrdb -merge ~/.Xdefaults or xrdb -merge ~/.Xresources, depending upon the file you happen to use.
    – bgoodr
    Aug 15, 2022 at 14:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .