windowsのemacsでプロポーショナルフォントが使えるように設定できたので、手書きフォントも使えるようにしてみた。
init.el
(create-fontset-from-ascii-font
"Comic Sans MS:weight=normal:slant=normal" nil "handwritten")
(set-fontset-font "fontset-handwritten" 'japanese-jisx0208
(font-spec :family "S2GP海フォント"))
(add-to-list 'face-font-rescale-alist '("S2GP海フォント" . 1.09))
(defface handwritten
'((default . (:family "Comic Sans MS"))) "手書きフォント")
;; (defface handwritten
;; '((default . (:family "S2GP海フォント"))) "手書きフォント")
(set-face-attribute 'handwritten nil :fontset "fontset-handwritten")
(require 'face-remap)
(defun handwritten-face-mode (&optional arg)
"handwritten-face mode.
An interface to `buffer-face-mode' which uses the `handwritten' face.
Besides the choice of face, it is the same as `buffer-face-mode'."
(interactive (list (or current-prefix-arg 'toggle)))
(buffer-face-mode-invoke 'handwritten arg
(called-interactively-p 'interactive)))
ascii文字もS2GP海フォントにすることもできるが、このフォントにはイタリック体がないのでComic Sans MSにした。ascii文字もS2GP海フォントにする場合はdeffaceの部分を変更する。