2

This might be an exceedingly silly question, but I can't seem to solve it anyway. I want to use GNU's Unifont in xterm, and with the purpose in mind I installed the package xfonts-unifont, but to no avail; I do know I am supposed to use the -fn option for bitmap fonts, and (probably) something like "xterm*font: 7x13" in the .Xresources file, but for that I need to know the NAME of the bitmap font. Using "Unifont" or "unifont" didn't help.

Can anyone please suggest me exactly what I should write in my .Xresources file to make xterm use the bitmap version of Unifont? I don't want to use ttfs, not for xterm anyway. Thanks in advance. By the way, I'm using Ubuntu Gnome 14.04.

2 Answers 2

3

First, I'd recommend using an xterm alternative instead of customizing it.

But since you asked, there is this utility called xfontsel (in the x11-utils package) that gives you the font names for font resources. In this case, the font name you are looking for is -gnu-unifont-*-*-*-*-*-*-*-*-*-*-*

You can test it on the command line using:

xterm -font '-gnu-unifont-*-*-*-*-*-*-*-*-*-*-*'

So to answer your question, your .Xresources would contain this line

xterm*font: -gnu-unifont-*-*-*-*-*-*-*-*-*-*-*

and don't forget to reload it with xrdb -merge .Xresources

1
  • Thanks! What I got wrong the first time is a reboot is needed for xfontsel to take effect.
    – nos_feratu
    Jan 7, 2016 at 16:31
0

I had the same problem. I never was able to find the name with * in it. However, when I placed the following in my ~/.Xresources:

xterm*faceName: Unifont:style=Regular
xterm*boldFaceName: Unifont:style=Regular

After that, at the main terminal, I ran

xrdb -merge ~/.Xresources

After restarting the system (I don't know if that was necessary, but I did it), my xterm text was displayed in Unifont.

By the way, I was never able to get Unifont displayed when I used xterm*font. For example, it didn't work with xterm*font: unifont, xterm*font: Unifont, nor with xterm*font: Unifont:style=Regular. I don't see any -*-*-unifont-*-*-... when I run xterm -report-fonts.

I realize that you've accepted an answer that uses a different procedure from your accepted answer. I wasn't able to get things working with that answer, which might be because I did things wrong. I think that the actual reason might be that I installed the font using

$ cd /usr/share/fonts
$ mkdir -p unifont-fonts
$ cd unifont-fonts
$ wget -q https://ftp.gnu.org/gnu/unifont/unifont-14.0.01/unifont-14.0.01.ttf

Then, to rebuild the font cache:

fc-cache -f -v

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.