Using True Type Fonts in XTerm

frankhjung
  12 years ago
  5

 
I’ve not had to use TrueType fonts before as my desktop display resolution never warranted it. Now with eyesight failing and much better monitors, I decided to give them a go. Fonts are globally managed by settings in /etc/X11/app-defaults. However, TrueType fonts can be locally set using ~/.Xresources.
 
To browse the list of fonts use
 
fc-list :fontformat=TrueType -f "%{family}\n" | sort -u | less
 
Test a font by specifyng in the xterm command -fa option
 
xterm -fa 'Luxi Mono' -fs 10
 
Where fa refers to the fonts face name, and fs, the font size.
 
Once happy with your font, apply to your application in ~/.Xresources
For example to apply for XTerm
 
! my customisations
XTerm*faceName: DejaVu Sans Mono
XTerm*faceSize: 11
 
The final step is to set these resource changes using xrdb
 
xrdb -merge .Xresources
 
So, next time you invoke a plain xterm command you will be greeted with your new font.
Comments
osirisgothra 11 years ago

Thanks alot for this, it comes in handy, i was soooo used to having to type stuff like -fn -Sony-*-*-*-230-*-blah-blah-*- and that is getting harder on the fingers with age :) so i totally understand, plus the new fonts *are* a lot easier to read when your like me and have fading vision... so thanks for this post :)

= O

gabriel@paradisim.tk
http://paradisim.tk