Meadow でのフォント設定

昨日,かんなり,はまりました。
なので,記録しておきます。誰かの助けになることを祈って。。。
やりたいこと。

  • 日本語,ascii 文字,両方に,こないだ作った,M+とIPAG の合成フォントである,M+1M+IPAG を使用したい。

日本語は問題なく反映されたけど,アスキー文字には適用されなくて,はまりました。
Meadowのマニュアルみたり,MSDN で LOGFONT 構造体 調べたり。
原因は,CHARACTER SET の指定の仕方が間違っていたこと。
0 が なんちゃらLatin,128 が SHIFT-JIS らしいが,アスキー文字を指定するところで,
0 を指定してしまっていたことが原因。
要するに,日本語フォントなのに 0 を指定しちゃいかんぜよ,ってことかな。
見た目はいい感じ。あとは背景色とか,文字色を変更したりだな。
以下が現在の設定。

(w32-add-font
 "M+1M+IPAG"
 '((spec
	((:char-spec ascii :height any)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 400 0 nil nil nil 128 1 3 49))
	((:char-spec ascii :height any :weight bold)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 700 0 nil nil nil 128 1 3 49))
	((:char-spec ascii :height any :slant italic)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 400 0 nil nil nil 128 1 3 49))
	((:char-spec ascii :height any :weight bold :slant italic)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 700 0 nil nil nil 128 1 3 49))
	((:char-spec katakana-jisx0201 :height any)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 400 0 nil nil nil 128 1 3 49))
	((:char-spec katakana-jisx0201 :height any :weight bold)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 400 0 nil nil nil 128 1 3 49))
	((:char-spec katakana-jisx0201 :height any :slant italic)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 400 0 t nil nil 128 1 3 49))
	((:char-spec katakana-jisx0201 :height any :weight bold :slant italic)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 700 0 t nil nil 128 1 3 49))
	((:char-spec japanese-jisx0208 :height any)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 400 0 nil nil nil 128 1 3 49))
	((:char-spec japanese-jisx0208 :height any :weight bold)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 700 0 nil nil nil 128 1 3 49))
	((:char-spec japanese-jisx0208 :height any :slant italic)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 400 0 t nil nil 128 1 3 49))
	((:char-spec japanese-jisx0208 :height any :weight bold :slant italic)
	 strict
	 (w32-logfont "M+1M+IPAG" 0 -11 700 0 t nil nil 128 1 3 49)))))