X11用の各種フォントをインストールする

XFree96/OpenBSD の標準のフォントだけでは、種類が非常に少なく、 特に日本語では、文字の大きさや装飾の選択がほとんど不可能です。 そこで、フリーのフォントをインストールしてみます。

/efont/ の japanese bitmap fonts collection は、 各種のサイズ(10, 12, 14, 16, 18, 20, 24ポイント)、 各種の装飾(標準, bold, italic, bold-ltalic)の日本語フォントを含んでいます。 また、一部サイズでは、JIS X0213.2000 のフォントも含んでいます。

GNU の international fonts は、 GNU emacs (mule) で扱うことのできる各種言語のフォントを含んでいます。

ports の freefonts (collection of ATM fonts from the CICA archives) は、 各種のアウトラインフォント(英字のみ)です。 GIMP でロゴを作る場合に有用です。

japanese bitmap fonts collection のインストール

  1. ソースを展開します。 以下のように gtar を使うのが簡単です。 bzip2 は必須です。
    % gtar xjvf …/japanese-bitmap-fonts-0.4.5.tar.bz2
    % cd japanese-bitmap-fonts-0.4.5
    
  2. configure を実行します。
    % ./configure --with-fontdir=/usr/local/lib/X11/fonts/japanese --enable-
    compress=gzip --with-pcf=yes --with-bdf=no
    
  3. インストールします。 /usr/local/lib/X11/fonts/japanese の下に格納されます。
    % su
    # make install
    

international fonts のインストール

  1. ソースを展開します。
    % tar xzvf …/intlfonts-1.3.tar.gz
    % cd intlfonts-1.3
    
  2. configure を実行します。
    % ./configure --with-fontdir=/usr/local/lib/X11/fonts/intlfonts --enable
    -compress=gzip --with-pcf=yes --with-bdf=no
    
  3. インストールします。 /usr/local/lib/X11/fonts/intlfonts の下に格納されます。
    % su
    # make install
    

freefonts のインストール

  1. ports からインストールします。
    % su
    # cd /usr/ports/x11/freefonts
    # make
    # make install
    

XFree86 の設定変更

  1. 設定ファイル /etc/X11/XF86Config のフォントパスの定義を変更します。 以下のように "Files" セクションの FontPath 定義として追加します。
    Section "Files"
         ・・・
        FontPath "/usr/local/lib/X11/fonts/japanese/:unscaled"
        FontPath "/usr/local/lib/X11/fonts/intlfonts/:unscaled"
        FontPath "/usr/local/lib/X11/fonts/freefont/"
        FontPath "/usr/X11R6/lib/X11/fonts/misc/:unscaled"
        FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
        FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
        FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
        FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
         ・・・
    EndSection