After a lot of mucking around Xterm, poring through reams of webpages I have thrown in the towel and realized that this isn't something I can figure out on my own.
TrueType vs Bitmap
Is the option
xterm*font
used to specify only bitmap fonts and is*faceName
used only for TrueType fonts?I'm using the commands
xlsfonts
andfc-list
to find out the Bitmap and TrueType fonts that are installed. Is this correct?I want to set the XTerm font to Ubuntu Mono. This is the output of
fc-list | grep -i ubuntu
Ubuntu Mono for Powerline:style=RegularForPowerline Ubuntu Mono for Powerline:style=Bold Italic Ubuntu Mono for Powerline:style=BoldForPowerline Ubuntu Mono for Powerline:style=ItalicForPowerline
and I added XTerm*faceName: Ubuntu Mono for Powerline:style=RegularForPowerline
to my ~/.Xresources
and ran xrdb -merge ~/.Xresources
xrdb -query all
shows that *faceName
is set to Ubuntu Mono for Powerline:style=RegularForPowerline
However, this doesn't work. What am I missing/screwing up here?
EDIT: 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.
Hope this helps; please let me know in case I've missed anything.
P.S. I used Ubuntu Mono patched font downloaded from here I'm using XTerm*faceName: "Ubuntu Mono derivative Powerline"