D.

Meadow3 で VL ゴシックフォントを利用する。

Windows の Meadow3 に移行したのでメモ。

  1. HOME 環境変数を設定する (C:\Users\myname) ← Windows XP の場合はジャンクションを張ると良い。
  2. dot.emacs.ja というファイルが付属しているので上記フォルダにコピーして .emacs にリネームする。
  3. .emacs.d/elispUNIX から持ってきた資産を配置して .emacs に追記する。
  4. Windows で動作しない lisp コードはすべてコメントアウトするか OS を評価する等して回避。
  5. フォントの設定をする (ここが重要)。

.emacs に追記するコード

(byte-recompile-directory "~/.emacs.d/elisp")
(load "~/.emacs.d/elisp/startup") ;; ~/.emacs.d/elisp/startup.el をロードする

Windows 用フォントの設定例

(if window-system
  (progn
    (cond
      ((eq system-type 'windows-nt)
        (w32-add-font
         "vl-gothic-12"
         '((spec
            ((:char-spec ascii :height any)
             strict
             (w32-logfont "VL ゴシック" 0 -12 400 0 nil nil nil 128 1 3 49))
             ((:char-spec ascii :height any :weight bold)
              strict
              (w32-logfont "VL ゴシック" 0 -12 700 0 nil nil nil 128 1 3 49))
             ((:char-spec ascii :height any :slant italic)
             strict
             (w32-logfont "VL ゴシック" 0 -12 400 0 t nil nil 128 1 3 49))
             ((:char-spec ascii :height any :weight bold :slant italic)
              strict
              (w32-logfont "VL ゴシック" 0 -12 700 0 t nil nil 128 1 3 49))
             ((:char-spec japanese-jisx0208 :height any)
              strict
              (w32-logfont "VL ゴシック" 0 -12 400 0 nil nil nil 128 1 3 49))
             ((:char-spec japanese-jisx0208 :height any :weight bold)
              strict
              (w32-logfont "VL ゴシック" 0 -12 700 0 nil nil nil 128 1 3 49))
             ((:char-spec japanese-jisx0208 :height any :slant italic)
             strict
             (w32-logfont "VL ゴシック" 0 -12 400 0 t nil nil 128 1 3 49))
             ((:char-spec japanese-jisx0208 :height any :weight bold :slant italic)
              strict
              (w32-logfont "VL ゴシック" 0 -12 700 0 t nil nil 128 1 3 49)
              ((spacing . -1))
             ))))
        (setq default-frame-alist
              (append (list '(top . 0) ; 起動時の表示位置(上から)
                            '(left . 0) ; 起動時の表示位置(左から)
                            '(width . 120) ; 起動時のサイズ(幅)
                            '(height . 40) ; 起動時のサイズ(縦)
                            '(font . "vl-gothic-12"); VL Gothic
                            ))))

VL ゴシックフォントはあらかじめダウンロードしてインストールしておく。
まだ細かい問題は残るけど、これでひとまず EmacsWindows で使えるようになる。