[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
Re: TrueTypeフォントで表示
- X-ml-count: 2900
- Subject: Re: TrueTypeフォントで表示
- From: te-kun <j-kiss@xxxxxxxx>
- Date: Thu, 21 Dec 2000 16:28:39 +0900 (JST)
- X-mailer: Mew version 1.95b90 on Emacs 20.6 / Mule 4.1 (AOI)
はじめまして、弓岡と申します。
# 長文失礼します。
# 既に時期を逸していると思いますが、
From: ISHIKAWA Tadashi <ishima@xxxxxxxxxxxxxx>
Subject: TrueTypeフォントで表示
Date: Thu, 21 Dec 2000 12:28:25 +0900
ishima> Meadow 1.10で表示されるフォントを、Windows TrueTypeフォントにしよう
ishima> と試行錯誤しています。.emacsは
どこのページかは忘れましたが、Webにあったのを参考に、以下のようにして、
フォントの切り替えをしています。
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; フォント設定用の補助関数
(defun my-define-font (prefix font-param logfont-charset-list)
(let (charset-font-list logfont-list charset-alist)
(while logfont-charset-list
(setq logfont-list (nth 0 (car logfont-charset-list)))
(setq charset-alist (nth 1 (car logfont-charset-list)))
(while charset-alist
(let* ((charset (caar charset-alist))
(encoding (cdar charset-alist))
(font-name (concat prefix (symbol-name charset))))
(create-font-from-logfont-list font-name
logfont-list encoding font-param)
(setq charset-font-list
(cons (cons charset font-name) charset-font-list)))
(setq charset-alist (cdr charset-alist)))
(setq logfont-charset-list (cdr logfont-charset-list)))
charset-font-list))
(let ((bdf-dir "c:/cygwin/usr/local/Meadow/font/bdf/")
charset-font-list logfont-charset-list font-param)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; TrueType標準フォントの設定
(setq font-param
'((overhang . 0)
(base . 14)
(height . 16)
(width . 8)))
;; 論理フォントと、対応する文字集合のリスト
(setq logfont-charset-list
'(
;; 英字フォント
(
;; 論理フォントのリスト(normal, bold, italic, bold + italic の順)
((w32-logfont "MS 明朝" 0 -16 400 0 nil nil nil 128 1 3 17)
(w32-logfont "MS 明朝" 0 -16 400 0 nil nil nil 128 1 3 17)
(w32-logfont "MS 明朝" 0 -16 400 0 nil nil nil 128 1 3 17)
(w32-logfont "MS 明朝" 0 -16 400 0 nil nil nil 128 1 3 17))
;; 文字集合と、フォントのコーディング方法の連想リスト
((ascii . 0)
(latin-iso8859-1 . 1)))
;; 日本語フォント
(((w32-logfont "MS ゴシック" 0 -16 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -16 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -16 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -16 400 0 nil nil nil 128 1 3 49))
((latin-jisx0201 . 0)
(katakana-jisx0201 . 4)
(japanese-jisx0208 . 4)))))
;; フォントの作成(結果は文字集合と、作成したフォントの連想リスト)
(setq charset-font-list
(my-define-font "w14-" font-param logfont-charset-list))
;; フォントセットの作成
(new-fontset "w14-fontset" charset-font-list)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; W-16フォントの設定
(setq font-param
'((overhang . 0)
(base . 16)
(height . 18)
(width . 10)))
(setq logfont-charset-list
'(
(
((w32-logfont "MS 明朝" 0 -19 400 0 nil nil nil 128 1 3 17)
(w32-logfont "MS 明朝" 0 -19 400 0 nil nil nil 128 1 3 17)
(w32-logfont "MS 明朝" 0 -19 400 0 nil nil nil 128 1 3 17)
(w32-logfont "MS 明朝" 0 -19 400 0 nil nil nil 128 1 3 17))
((ascii . 0)
(latin-iso8859-1 . 1)))
(((w32-logfont "MS ゴシック" 0 -19 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -19 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -19 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -19 400 0 nil nil nil 128 1 3 49))
((latin-jisx0201 . 0)
(katakana-jisx0201 . 4)
(japanese-jisx0208 . 4)))))
(setq charset-font-list
(my-define-font "w16-" font-param logfont-charset-list))
(new-fontset "w16-fontset" charset-font-list)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; W-18フォントの設定
(setq font-param
'((overhang . 0)
(base . 18)
(height . 22)
(width . 12)))
(setq logfont-charset-list
'(
(
((w32-logfont "MS 明朝" 0 -21 400 0 nil nil nil 128 1 3 17)
(w32-logfont "MS 明朝" 0 -21 400 0 nil nil nil 128 1 3 17)
(w32-logfont "MS 明朝" 0 -21 400 0 nil nil nil 128 1 3 17)
(w32-logfont "MS 明朝" 0 -21 400 0 nil nil nil 128 1 3 17))
((ascii . 0)
(latin-iso8859-1 . 1)))
(((w32-logfont "MS ゴシック" 0 -21 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -21 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -21 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -21 400 0 nil nil nil 128 1 3 49))
((latin-jisx0201 . 0)
(katakana-jisx0201 . 4)
(japanese-jisx0208 . 4)))))
(setq charset-font-list
(my-define-font "w18-" font-param logfont-charset-list))
(new-fontset "w18-fontset" charset-font-list)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Curierフォントの設定
(setq font-param
'((overhang . 0)
(base . 16)
(height . 18)
(width . 10)))
(setq logfont-charset-list
'(
(
((w32-logfont "Courier New" 0 -19 400 0 nil nil nil 0 1 3 49)
(w32-logfont "Courier New" 0 -19 400 0 nil nil nil 0 1 3 49)
(w32-logfont "Courier New" 0 -19 400 0 nil nil nil 0 1 3 49)
(w32-logfont "Courier New" 0 -19 400 0 nil nil nil 0 1 3 49))
((ascii . 0)
(latin-iso8859-1 . 1)))
(((w32-logfont "MS ゴシック" 0 -19 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -19 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -19 400 0 nil nil nil 128 1 3 49)
(w32-logfont "MS ゴシック" 0 -19 400 0 nil nil nil 128 1 3 49))
((latin-jisx0201 . 0)
(katakana-jisx0201 . 4)
(japanese-jisx0208 . 4)))))
(setq charset-font-list
(my-define-font "w16c-" font-param logfont-charset-list))
(new-fontset "w16c-fontset" charset-font-list)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; フレームの設定
(setq default-frame-alist
(append
'((foreground-color . "white") ; 前景色
(background-color . "black") ; 背景色
(mouse-color . "red") ; マウス色(???)
(cursor-color . "red") ; カーソル色
(width . 80) ; フレーム幅(文字数)
(height . 30) ; フレーム高(文字数)
(top . 30) ; フレームの Y 位置(ピクセル数)
(left . 250) ; フレームの X 位置(ピクセル数)
(ime-font . "w14-japanese-jisx0208") ; IME 用のフォント
(font . "w14-fontset"))
; デフォルトのフォントセット
default-frame-alist))