Diff for /wikisrc/tutorials/how_to_use_ttf_fonts_in_xterm.mdwn between versions 1.1 and 1.2

version 1.1, 2011/11/20 20:55:21 version 1.2, 2012/02/05 07:14:36
Line 1 Line 1
 **Contents**  **Contents**
   
 [[!toc]]  [[!toc]]
   
 #  Introduction  #  Introduction
   
 The purpose of this document is to guide you on how to make xterm use a [truetype][10] font.  The purpose of this document is to guide you on how to make xterm use a [truetype][10] font. 
   
    [10]: http://en.wikipedia.org/wiki/TrueType (http://en.wikipedia.org/wiki/TrueType)     [10]: http://en.wikipedia.org/wiki/TrueType (http://en.wikipedia.org/wiki/TrueType)
   
 #  freetype support  #  freetype support
   
 First you need to compile xterm with [freetype][11] support. Assuming your pkgsrc is located in `/usr/pkgsrc`, you may write:  First you need to compile xterm with [freetype][11] support. Assuming your pkgsrc is located in `/usr/pkgsrc`, you may write: 
          
        [11]: http://en.wikipedia.org/wiki/FreeType (http://en.wikipedia.org/wiki/FreeType)         [11]: http://en.wikipedia.org/wiki/FreeType (http://en.wikipedia.org/wiki/FreeType)
   
 # cd /usr/pkgsrc/x11/xterm  # cd /usr/pkgsrc/x11/xterm
     # make PKG_OPTIONS.xterm=freetype      # make PKG_OPTIONS.xterm=freetype
     # make install      # make install
          
   
 Note: If you want to compile every application with freetype enabled, provided it has support for it, add `PKG_DEFAULT_OPTIONS+=freetype` in your `/etc/mk.conf` file.  Note: If you want to compile every application with freetype enabled, provided it has support for it, add `PKG_DEFAULT_OPTIONS+=freetype` in your `/etc/mk.conf` file. 
   
 #  Choose font  #  Choose font
   
 First pick a font you like, from this list:  First pick a font you like, from this list: 
          
     $ fc-list | col | sort | less      $ fc-list | col | sort | less
          
   
 Note: A nice font set is [Liberation][12]. It can be found in `fonts/liberation-ttf`.  Note: A nice font set is [Liberation][12]. It can be found in `fonts/liberation-ttf`. 
   
    [12]: http://en.wikipedia.org/wiki/Liberation_fonts (http://en.wikipedia.org/wiki/Liberation_fonts)     [12]: http://en.wikipedia.org/wiki/Liberation_fonts (http://en.wikipedia.org/wiki/Liberation_fonts)
   
 #  Run xterm  #  Run xterm
   
 Then type:  Then type: 
          
     xterm -fa 'Liberation Mono' -fs 10      xterm -fa 'Liberation Mono' -fs 10
          
   
 #  ~/.Xdefaults file  #  ~/.Xdefaults file
   
 If you want xterm to use these font settings by default, you may add the following lines in your `~/.Xdefaults` file:  If you want xterm to use these font settings by default, you may add the following lines in your `~/.Xdefaults` file: 
          
     XTerm*faceName: Liberation Mono      XTerm*faceName: Liberation Mono
     XTerm*faceSize: 10      XTerm*faceSize: 10
          
   
 #  Screenshots  #  Screenshots
   
 ![](/images/Xterm-ttf.jpeg)    ![](/images/Xterm-ttf.jpeg)  
   
 Liberation TTF  Liberation TTF 
   
 #  Credits  #  Credits
   
 This articled is based on a post in the [BSD nexus forum](http://forums.bsdnexus.com/viewtopic.php?pid=15728).  This articled is based on a post in the [BSD nexus forum](http://forums.bsdnexus.com/viewtopic.php?pid=15728). 

Removed from v.1.1  
changed lines
  Added in v.1.2


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb