[macemacsjp-cvs 129] CVS update: fixed-width-fontset

Back to archive index

Takashi Hiromatsu matsu****@users*****
2005年 11月 17日 (木) 23:00:52 JST


Index: fixed-width-fontset/Changelog
diff -u fixed-width-fontset/Changelog:1.5 fixed-width-fontset/Changelog:1.6
--- fixed-width-fontset/Changelog:1.5	Tue Nov 15 21:56:48 2005
+++ fixed-width-fontset/Changelog	Thu Nov 17 23:00:52 2005
@@ -1,3 +1,12 @@
+2005-11-17  Takashi HIROMATSU  <matsu****@users*****>
+
+	* carbon-font.el: Doc. changed.
+
+	* fixed-width-fontset.el (fixed-width-set-default-fontset): new function
+	(after-setting-font-hook): modified for keeping rescale-alist on initial
+	frame.
+	(set-default-font): ignore advice
+
 2005-11-15  Takashi HIROMATSU  <matsu****@users*****>
 
 	* ntemacs-font.el: Doc. changed slightly
Index: fixed-width-fontset/carbon-font.el
diff -u fixed-width-fontset/carbon-font.el:1.6 fixed-width-fontset/carbon-font.el:1.7
--- fixed-width-fontset/carbon-font.el:1.6	Tue Nov 15 21:56:48 2005
+++ fixed-width-fontset/carbon-font.el	Thu Nov 17 23:00:52 2005
@@ -1,8 +1,8 @@
 ;;; carbon-font.el -- fontsets for Carbon Emacs -*- coding: iso-2022-7bit -*-
 
 ;; Copyright (C) 2004-2005 by T. Hiromatsu <matsu****@users*****>
-;; Version 1_5_2
-;; 2005-11-15
+;; Version 1_5_3
+;; 2005-11-17
 
 ;;; Commentary:
 
@@ -79,18 +79,45 @@
 ;;      (if (eq window-system 'mac) (require 'carbon-font))
 ;;
 ;;  2.3. set fontset
-;;      Fontset names doesn't include size. If you set the fontset like as
-;;          (set-default-font "fontset-hiraginomaru")
-;;      font size was set to 12 (default).
-;;
-;;      If you want to use another size, please use full fontset name like
-;;      as shown in below.
-;;          (set-default-font
-;;              "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginomaru")
+;;      If font is defined like as 
+;;          "fontset-hiraginokaku",
+;;      12point of ヒラギノ角ゴシック(hiraginokaku) is used.
+;;
+;;      If you want to use other sizes, please use full XLFD name like as 
+;;            "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginomaru"
+;;
+;;  2.3.1. If you are not familiar to emacs lisp, follow this section.
+;;
+;;      To define default fontset, I suggest you to use
+;;      'fixed-width-set-default-fontset as below.
+;;         12point
+;;             (fixed-width-set-default-fontset "fontset-hiraginokaku")
+;;         other sizes
+;;             (fixed-width-set-default-fontset
+;;                  "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginokaku")
+;;
+;;      On initial frame, to use different font from default one, please set 
+;;          (add-to-list 'initial-frame-alist '(font . "fontset-hiraginomaru"))
 ;;      or
 ;;          (add-to-list
-;;              'default-frame-alist
-;;              '(font . "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginomaru"))
+;;           'initial-frame-alist
+;;           '(font . "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginomaru"))
+;;
+;;      To change fontset only on current frame, set
+;;          (set-frame-font "fontset-hiraginomaru")
+;;      or
+;;          (set-frame-font
+;;           "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginomaru")
+;;
+;;  2.3.2. If you are familiar to E-lisps
+;;
+;;      In .emacs.el, by setting ('font . fontset-name) in 
+;;          'default-frame-alist
+;;      or
+;;          'initial-frame-alist
+;;      font "fontset-name" should be used.
+;;      
+;;      To change font on current frame, please use 'set-frame-font.
 ;;
 ;;  3. create your own fontset
 ;;      If you want to create another fontset, please use  new function
@@ -172,23 +199,48 @@
 ;;      としてください。
 ;;
 ;;  2.3. set fontset
-;;      次のようにした場合、
-;;          (set-default-font "fontset-hiraginokaku")
+;;      次のように指定した場合、
+;;          "fontset-hiraginokaku"
 ;;      ヒラギノ角ゴシックの12point が使われます。
 ;;
 ;;      これ以外のサイズを使いたい場合は、
+;;            "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginomaru"
+;;      の様に、フルXLFDネームを指定してください。
 ;;
-;;          (set-default-font
-;;            "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginomaru")
-;;      又は
+;;  2.3.1. emacs lisp に馴染の無い方の為に
+;;
+;;      デフォルトで使うフォントセットの指定する場合は以下のように
+;;      fixed-width-set-default-fontset を使ってください。
+;;         12pointを使う場合
+;;             (fixed-width-set-default-fontset "fontset-hiraginokaku")
+;;         12point以外のサイズを使う場合
+;;             (fixed-width-set-default-fontset
+;;                  "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginokaku")
+;;
+;;      最初のフレームだけ、別のfontsetを使いたい場合は、
+;;          (add-to-list 'initial-frame-alist '(font . "fontset-hiraginomaru"))
+;;      や、
 ;;          (add-to-list
-;;           'default-frame-alist
+;;           'initial-frame-alist
 ;;           '(font . "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginomaru"))
+;;      等として下さい。
 ;;
+;;      今カーソルの有るフレームだけ、フォントを変更したい場合は、
+;;          (set-frame-font "fontset-hiraginomaru")
+;;      や
+;;          (set-frame-font
+;;           "-*-*-medium-r-normal--8-*-*-*-*-*-fontset-hiraginomaru")
 ;;      としてください。
 ;;
-;;      最初は、fontsetの指定をしないで、shift + click で出てくる、fontset
-;;      menu から、お好みの物を探す方が良いかもしれません。
+;; 2.3.2. emacs lisp を理解して居られる方に
+;;
+;;      .emacs.el で
+;;          'default-frame-alist
+;;      及び
+;;          'initial-frame-alist
+;;      に、('font . fontset-name) を設定することにより、fontset-name が各々
+;;      有効になります。
+;;      又、現在のフレームのフォントを変更するには、set-frame-font をお使い下さい。
 ;;
 ;;  3. 別のフォントセットを作りたい場合
 ;;      別の組合せの fontset を設定したい場合。(新機能)
Index: fixed-width-fontset/fixed-width-fontset.el
diff -u fixed-width-fontset/fixed-width-fontset.el:1.5 fixed-width-fontset/fixed-width-fontset.el:1.6
--- fixed-width-fontset/fixed-width-fontset.el:1.5	Tue Nov 15 21:56:48 2005
+++ fixed-width-fontset/fixed-width-fontset.el	Thu Nov 17 23:00:52 2005
@@ -1,8 +1,8 @@
 ;;; fixed-width-fontset.el -*- coding: iso-2022-7bit -*-
 
 ;; Copyright (C) 2005 by T. Hiromatsu <matsu****@users*****>
-;; Version 1_0_2
-;; 2005-11-15
+;; Version 1_0_3
+;; 2005-11-17
 
 ;;; Commentary:
 
@@ -116,6 +116,12 @@
     (if (frame-live-p fixed-width-initial-frame)
         (fixed-width-append-factor fixed-width-initial-frame))))
 
+(defun fixed-width-set-default-fontset (fontset)
+  "Set default font of default-frame-alist"
+  (let ((old (assoc 'font default-frame-alist)))
+    (if old (setcdr old fontset)
+      (add-to-list 'default-frame-alist (cons 'font fontset)))))
+
 ;;  フォントが変更された場合にフックをかけて、
 ;;  fixed-width-append-factor を起動する。
 
@@ -131,20 +137,15 @@
              (or fixed-width-initial-frame
                  (setq fixed-width-initial-frame (selected-frame)))))
 
-(add-hook 'after-setting-font-hook '(lambda () (fixed-width-append-factor nil)))
+(add-hook 'after-setting-font-hook
+          '(lambda ()
+             (fixed-width-append-factor nil)
+             (if (frame-live-p fixed-width-initial-frame)
+                 (progn (select-frame fixed-width-initial-frame)
+                        (fixed-width-append-factor fixed-width-initial-frame)))))
 
 (add-hook 'emacs-startup-hook '(lambda () (fixed-width-append-factor nil t)))
 
-(defadvice set-default-font
-  (after fixed-width-set-default-font (font-name &optional keep-size) activate)
-  "adviced by the fixed-width-fontset package to add font element to the
-`default-frame-alist according to it's name DEFAULT. If you want to change
-fontset only on the selected frame without changing `default-frame-alist,
-use `set-frame-font."
-  (let ((old (assoc 'font default-frame-alist)))
-    (if old (setcdr old font-name)
-      (add-to-list 'default-frame-alist (cons 'font font-name)))))
-
 (provide 'fixed-width-fontset)
 
 ;;; fixed-width-fontset.el ends here


macemacsjp-cvs メーリングリストの案内
Back to archive index