[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: [MD:5080] Re: resize frame



藤井です。

From: MIYOSHI Masanori <miyoshi@xxxxxxxxxxx>
Subject: Re: [MD:5080] Re: resize frame
Date: Sat, 12 Jun 2004 23:02:11 +0900
Message-ID: <u8yesri1o.wl%miyoshi@xxxxxxxxxxx>

> >>>>> [meadow-develop : No.5084] にて
> >>>>> "藤井" = "M.Fujii" <boochang@xxxxxxxxxxxx> さんは書きました:
> 藤井> > それから、藤井さんの[meadow-users-jp: 5584]の件もこの修正で解決す
> 藤井> > るかもしれません。
> 藤井> > 確認お願いできませんか? > 藤井さん
> 藤井> > 
> 藤井> > ;; 私のところでは再現しませんので確認できません。
> 
> 藤井> はい、早速試してみました。
> 藤井> ですが、やはり同じ症状が発生します。
> 
> そうですか、別の原因でしたか。残念。
> 
> ぜひとも手元で再現させたいので、再現するときの設定(BDF など)を教
> えてもらえますか?

とりあえず私の BDF フォント設定をコンパクトにしたものを添付します。BDF 
ファイルについても必要であればお送りします。

再現手順は以下のとおりです。

1. -q オプション付きで起動
2. scratch バッファで (load "~/saigen.el") を評価
3. Shift + 左クリックで "bdf-16" にフォント変更
4. C-g を押しっぱなし

以上宜しくお願いします。

以下が saigen.el です。

============================================================
;; -*- mode: lisp-interaction; syntax: elisp; coding: iso-2022-7bit -*-

(defconst private-bdf-font-dir "d:/usr/local/share/font")

(setq scalable-fonts-allowed t)
(set-face-attribute 'fixed-pitch nil
		    :family "MS ゴシック"
		    :width 'normal
		    :height 1.0)
(set-face-attribute 'variable-pitch nil
		    :family "Arial"
		    :width 'normal
		    :height 1.0)

(defun my-font-file (file)
  (let ((bdf-file (expand-file-name file private-bdf-font-dir)))
    (if (file-exists-p bdf-file) bdf-file)))

(defun my-font-request-attribute (charset info &optional bold italic)
  (let* ((weight (if bold   'bold   'normal))
	 (slant  (if italic 'italic 'normal))
	 (file (if (stringp info) info (car info)))
	 (attrib (if (stringp info) nil (cdr info)))
	 (encoding (assq 'encoding attrib))
	 (w32-font-info (assq charset mw32-charset-windows-font-info-alist)))
    (let ((encoding-type (nth 2 w32-font-info))
	  (options (nth 3 w32-font-info)))
      (if (or (null encoding-type)
	      (memq encoding-type '(shift_jis
				    2-byte-set-msb
				    encode-cp1251-font)))
	  (setq encoding-type (unless (or (> (charset-dimension charset) 1) 
					  (memq charset '(arabic-digit
							  arabic-1-column
							  arabic-2-column)))
				'1-byte-set-msb)))
      (setq attrib (append attrib
			   (if (and (not encoding)
				    encoding-type)
			     (list (cons 'encoding encoding-type)))
			   options)))
    `((:char-spec ,charset :height any :weight ,weight :slant ,slant)
      strict
      (bdf-font ,(my-font-file file))
      ,attrib)))

(defun my-configure-font (fontinfo)
  (let* ((charset (nth 0 fontinfo))
	 (normal (nth 1 fontinfo))
	 (bold (if (nth 2 fontinfo) (nth 2 fontinfo) normal))
	 (italic (if (nth 3 fontinfo) (nth 3 fontinfo) normal))
	 (bold-italic (if (nth 4 fontinfo) (nth 4 fontinfo) italic)))
    (list (my-font-request-attribute charset normal nil nil)
	  (my-font-request-attribute charset bold t nil)
	  (my-font-request-attribute charset italic nil t)
	  (my-font-request-attribute charset bold-italic t t))))

(defun my-add-font (name fonts-file-alist)
  (w32-add-font name (list (cons 'spec
				 (apply 'append
					(mapcar (lambda (x)
						  (my-configure-font x))
						fonts-file-alist))))))

(setq my-intlfonts-file-alist
      '((ascii				;
	 "8x16.bdf"			; BDF (normal)
	 "shnm8x16ab.bdf"		;     (bold)
	 "8x16maru.bdf"			;     (italic)
	 "paw16a.bdf")			;     (bold-italic)
	(japanese-jisx0208		;
	 "jiskan16.bdf"			; BDF (normal)
	 "jiskan16b.bdf"		;     (bold)
	 "maru16.bdf"			;     (italic)
	 "paw16k.bdf")			;     (bold-italic)
	(katakana-jisx0201
	 "8x16rk.bdf"
	 "shnm8x16rb.bdf"
	 "8x16rk.bdf"
         "paw16a.bdf")
	(latin-jisx0201 
	 "8x16rk.bdf")
 	(japanese-jisx0208-1978
	 "j78-16.bdf")
 	(japanese-jisx0212
	 "jksp16.bdf")
	(japanese-jisx0213-1
	 "jiskan16-2000-1.bdf")
	(japanese-jisx0213-2
	 "jiskan16-2000-2.bdf")
	))

;; add BDF font "bdf-16".
(my-add-font "bdf-16" my-intlfonts-file-alist)

(setq ring-bell-function
	(lambda () 
	  (invert-face 'mode-line)
	  (sit-for 0 0)
	  (invert-face 'mode-line)))
============================================================


--
藤井 正行 / Masayuki FUJII ( boochang@xxxxxxxxxxxx )