Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using Mac OS X 10.8 and XQuartz 2.7.2. I have downloaded and placed several TrueType fonts named *.ttf in my /Users/<name>/.fonts directory. Upon running XQuartz several files including fonts.dir are created. This file has X11 font names of various encodings, etc. for each font I've installed.

My trouble is that I can't always "figure out" the correct name to use in xterm -fa <NAME> or in my .Xresources XTerm*faceName entry. For some fonts the core font name as listed in the detailed X11 font name in the fonts.dir file works whereas for others it doesn't.

share|improve this question
add comment

3 Answers

The following one-liner has often helped me a lot to find the correct font name:

$ fc-list | cut -f2 -d: | sort -u

Especially with Japanese fonts like 'IPAX0208Mincho', I would never have been able to guess the correct name.

share|improve this answer
add comment

You can use xfontsel to get the right name:

$ xfontsel

enter image description here

Chose the font you are interested in and then click on the "Select" button. That will copy the font name to the clipboard. Use that name to run xterm. E.g.:

$ xterm -font -adobe-helvetica-*-r-normal-*-12-120-*-*-*-*-*-*

Can't get it to work on my system (linux) using "-fa" but "-font" works.

share|improve this answer
    
Yes, I knew to use xfontsel to get the X11 font name and use xterm -font to select it. What's strange is that for some fonts I can use xterm -fa <simple font name> and it works fine on other fonts it doesn't. I think you must have to have a very specific spelling of the <simple font name> because if I take a font where it works and change one letter it doesn't work anymore. So, my basic question is how do you systematically determine the "correct" <simple font name> such that xterm -fa works. –  Jason Waldrop Aug 23 '12 at 14:22
    
@JasonWaldrop Ah. In that case, I'm stumped. –  terdon Aug 23 '12 at 15:35
add comment

If you use FontBook to load the font, it will display the correct name to use with xterm -fa.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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