Unable to configure font in XTerm
I finally figured out what's wrong just a couple of days ago after scrounging through multiple sources. Combining everyone's responses here:
Ubuntu Mono is a TrueType font and TrueType fonts require xterm to be compiled with FreeType library support. To check whether xterm has this, use the ldd /path/to/xterm/binary
command and see if it says freetype in there. An alternate way is to see if xterm has the -fa
option.
If your xterm has FreeType lib support, choose a
Bitmap fonts, by running
xfontsel -p
and use the exact string it prints upon exit.TrueType fonts, using
fc-list :scalable=true:spacing=mono: family
and use the exact string it outputs.
Once you have the font name using one of the above steps, set it via XTerm*faceName: <name of the font>
If you install a new font, and it doesn't show up when you run one of the above commands, rebuild your font cache using fc-cache -frv
and try again.
P.S. I used Ubuntu Mono patched font downloaded from here I'm using XTerm*faceName: Ubuntu Mono derivative Powerline
Thanks to Wumpus Q. Wumbley and Thomas Dickey for their detailed responses.
It is an old one, but for anyone coming here, the solution is:
XTerm*faceName: Ubuntu Mono:style=Regular
and if you want to see the change immediately then run:
xrdb -merge .Xresources
xterm
This question was first posted to stack overflow, where I answered it a year ago, noting that the actual package did not provide the style RegularForPowerline
(apparently OP was confused with some aspect of the output of fc-list
:
fc-list
shows meRegular
where you haveRegularForPowerline
.