
Ubuntu日本語フォーラム

ログインしていません。
みなさま、こんにちは。
私は、Ubuntu9.10を使っています。日本語RemixではないCD-imageでインストールし、後付けで日本語セットアップヘルパを入れています。
さて、実は先日 emacs23 をインストールし、使用しているのですが、
どういうきっかけかは思い出せないのですが、スタートアップ画面のフォントと
マウスカーソルをポイントしたときにポップアップされるクリーム色のボックスのなかに出てくるヘルプの文字
が、他のマシンのubuntu9.10日本語Remixと異なるようなのです。
大きな実害は無いのですが、
フォントの幅およびフォントとフォントの間隔の幅が広く、
そのためポップアップヘルプも微妙な位置で折り返され、
若干見にくい印象です。
バッファー内で使用するフォントは一見問題なく設定されているようで、
自分の通常使用では問題を感じません。
もし、スタートアップ画面およびポップアップヘルプのフォントを設定する項目について
ご存知の方がいらっしゃいましたら、ご教授いただけますと幸いです。
お忙しい中拙い文章での質問申し訳ございません。
よろしくお願いいたします。
なお、設定ファイルとして.emacs.elおよび.Xresourcesをいじっています。
以下ご参照いただけますと幸いです。
$ cat .emacs.el
;;
;;フォント設定
;;
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 120 :width normal :foundry "unknown" :family "東風明朝")))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 漢字変換 (Anthy) の設定
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(set-input-method "japanese-anthy")
(toggle-input-method nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; いろいろ
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Deleteキーでカーソル位置の文字が消えるようにする
(global-set-key [delete] 'delete-char)
;; C-h キーでカーソルの左の文字が消えるようにする。
;; ただし、もともと C-h はヘルプなので、
;; これを有効にすると、ヘルプを使うときには
;; M-x help や F1 を使う必要があります。
(global-set-key "\C-h" 'backward-delete-char)
; ---- language-env end DON'T MODIFY THIS LINE!
; 日本語入力切替
(define-key global-map "\C-]" 'toggle-input-method)
;===================================
; Wheel mouse
;===================================
; (global-set-key [mouse-4] 'scroll-down)
; (global-set-key [mouse-5] 'scroll-up)
;いちばん簡単な設定
(mouse-wheel-mode)
;半ページ/スクロール
(global-set-key [mouse-5] '(lambda () (interactive) (scroll-up (/ (window-height) 2))))
(global-set-key [mouse-4] '(lambda () (interactive) (scroll-down (/ (window-height) 2))))
;下記も半ページ/スクロールだけど上記2行のほうが短い
;(progn
; (defun scroll-up-half ()
; "Scroll up half a page."
; (interactive)
; (scroll-up (/ (window-height) 2))
; )
; (defun scroll-down-half ()
; "Scroll down half a page."
; (interactive)
; (scroll-down (/ (window-height) 2))
; )
; (global-set-key [(mouse-5)] 'scroll-up-half)
; (global-set-key [(mouse-4)] 'scroll-down-half)
;)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; mew
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(autoload 'mew "mew" nil t)
(autoload 'mew-send "mew" nil t)
(setq mew-demo nil)
;; Optional setup (Read Mail menu for Emacs 21):
(if (boundp 'read-mail-command)
(setq read-mail-command 'mew))
;; Optional setup (e.g. C-xm for sending a message):
(autoload 'mew-user-agent-compose "mew" nil t)
(if (boundp 'mail-user-agent)
(setq mail-user-agent 'mew-user-agent))
(if (fboundp 'define-mail-user-agent)
(define-mail-user-agent
'mew-user-agent
'mew-user-agent-compose
'mew-draft-send-message
'mew-draft-kill
'mew-send-hook))
;; 起動時にメールを取りにいかないようにする
(setq mew-auto-get nil)
(put 'upcase-region 'disabled nil)
;====================================
; Initial フレームサイズ,位置,色,フォントなど
;====================================
; 自分の好みにあわせて変更してください
(setq initial-frame-alist
(append (list
'(width . 144) ;; フレームの幅
'(height . 48) ;; フレームの高さ
'(top . 280) ;; Y 表示位置
'(left . 320) ;; X 表示位置
)
initial-frame-alist))
(setq default-frame-alist initial-frame-alist)$ cat .Xresources Emacs.FontBackend: xft Emacs.font: VL Gothic
オフライン
Rakko@自己フォローです。
>他のマシンのubuntu9.10日本語Remixと異なるようなのです。
と書きましたが、勘違いでした。
ubuntu9.10日本語RemixCDでインストールしたマシンでも、
sudo apt-get install emacs23
とemacs23を入れますと、フォント(の文字間幅)が幅広くなってしまうようです。
オフライン
Rakko@自己フォローです。
.Xresources ですが、
Emacs.FontBackend: xft
Emacs.font: VL Gothic
ではいまいち設定が反映されておらず
(xftに相当する設定がちゃんとしてないんだと思うのですが)
Emacs.Font: VL Gothic-10
(しかもフォントの設定が微妙に違いますが)
のみの記述だとスタートアップの文字が少し小さく変更できるようです。
・・・文字間の間隔の問題はフォントの設定のもんだいなのか、検証中です。
オフライン
ちょっと自分の状況と同じか自信がありませんが、emacs23自体がフォントの取扱いにいろいろ難点があるようで。。
ぐぐってみると、いろいろ苦労したというブログ類が見つかります。
http://emacs.g.hatena.ne.jp/sakito/20100127
http://ja.mostlyunix.com/?q=node/11
http://hide-t.vox.com/library/post/emacs23のフォント設定.html
で、emacs-lispが読めないなりに試行錯誤して、それなりに動く設定を見つけました。というかパクってきました。
なにかの参考になるかも知れませんので、自分の.emacsを晒してみます。関係の無い部分も削らず投稿しますので、必要な部分だけ参照下さい。
;======================================================================
; 言語・文字コード関連の設定
; Emacs 22(Gutsy)では、un-define の設定なしで utf-8 が使えます
;======================================================================
(setq load-path (cons "~/.emacs.d" load-path))
(setq load-path (cons "/usr/share/emacs/site-lisp" load-path))
;(setq load-path (cons "~/site-lisp" load-path))
;(setq load-path (cons "~/site-lisp/pysmell-0.7.3" load-path))
;(require 'un-define)
(set-language-environment "Japanese")
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-buffer-file-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(setq file-name-coding-system 'utf-8)
;;
;======================================================================
; Anthy
; CTRL-\で入力モード切替え
;======================================================================
(load-library "anthy")
(setq default-input-method "japanese-anthy")
(define-key isearch-mode-map "\C-\\" 'isearch-edit-string)
; TIME OUTの変更
; [参考サイト] http://spalab.naist.jp/~yuu-t/wiki/index.php?anthy-el-emacs23
(if (>= emacs-major-version 23)
(setq anthy-accept-timeout 1))
;;
;=======================================================================
;フォント
;=======================================================================
(cond (window-system
; (set-default-font "-*-fixed-medium-r-normal--12-*-*-*-*-*-*-*")
; (set-default-font "-shinonome-gothic-medium-r-normal--12-*-*-*-*-*-*-*")
(set-default-font "VL Gothic-9")
(progn
(set-face-font 'default
; "-shinonome-gothic-medium-r-normal--12-*-*-*-*-*-*-*")
"VL Gothic-9")
(set-face-font 'bold
; "-shinonome-gothic-bold-r-normal--12-*-*-*-*-*-*-*")
"VL Gothic-9")
(set-face-font 'italic
; "-shinonome-gothic-medium-i-normal--12-*-*-*-*-*-*-*")
"VL Gothic-9")
(set-face-font 'bold-italic
; "-shinonome-gothic-bold-i-normal--12-*-*-*-*-*-*-*")
"VL Gothic-9")
)))
;;
;=======================================================================
;フレームサイズ・位置・色など
;=======================================================================
(setq initial-frame-alist
(append (list
; '(foreground-color . "green") ;; 文字色
; '(background-color . "#222222") ;; 背景色
; '(border-color . "black")
; '(mouse-color . "green")
; '(cursor-color . "green")
'(width . 100) ;; フレームの幅
'(height . 45) ;; フレームの高さ
'(top . 20) ;; Y 表示位置
'(left . 300) ;; X 表示位置
)
initial-frame-alist))
(setq default-frame-alist initial-frame-alist)
;;
;=======================================================================
; Misc
;=======================================================================
;(mouse-wheel-mode) ;;ホイールマウス
(global-font-lock-mode t) ;;文字の色つけ
(setq line-number-mode t) ;;カーソルのある行番号を表示
(setq column-number-mode t) ;;カーソルのあるカラム番号を表示
(tool-bar-mode nil) ;;ツールバーを表示しない
(menu-bar-mode t)
(scroll-bar-mode nil)
(auto-compression-mode t) ;;日本語infoの文字化け防止
;(set-scroll-bar-mode 'right) ;;スクロールバーを右に表示
(global-set-key "\C-z" 'undo) ;;UNDO
(setq frame-title-format ;;フレームのタイトル指定
(concat "%b - emacs@" system-name))
(global-set-key "\C-m" 'newline-and-indent) ;;インデント付きの改行
;(display-time) ;;時計を表示
(global-set-key "\C-h" 'backward-delete-char) ;;Ctrl-Hでバックスペース
(setq make-backup-files nil) ;;バックアップファイルを作成しない
(setq visible-bell t) ;;警告音を消す
;(setq kill-whole-line t) ;;カーソルが行頭にある場合も行全体を削除
(setq-default indent-tabs-mode nil) ;;タブではなくスペースを使う
;rst-mode
(require 'rst)
(autoload 'rst-mode "rst-mode" "mode for editing reStructuredText documents" t)
(setq auto-mode-alist
(append '(("\\.rst$" . rst-mode)
("\\.rest$" . rst-mode)
("\\.mine$" . rst-mode)) auto-mode-alist))
(setq jit-lock-context-time 0.2)
(setq jit-lock-defer-time 0.1)
(setq jit-lock-stealth-time 0.5)
(setq jit-lock-stealth-verbose nil)
(setq jit-lock-stealth-nice 0.1)
(setq jit-lock-stealth-load 50)
(setq jit-lock-chunk-size 200)
;Default Directory
(setq default-directory "~/")
(setq insert-default-dirctory t)
; Python Setting
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
(eval-after-load "pymacs"
'(add-to-list 'pymacs-load-path "/usr/share/emacs/site-lisp"))
(require 'pysmell)
(add-hook 'python-mode-hook (lambda () (pysmell-mode 1)))
(add-hook 'python-mode-hook (lambda () (require 'pycomplete)))オフライン
hmatsue さん
ありがとうございます。
早速試させていただきました。
emacsバッファー上のフォントは設定できましたが、スタートアップ画面
(正式名称は、 Startup Screen って言うんでしょうか?)
のフォントは変わりませんでした。
しかし、emacsバッファー上のフォント(set-default-font とか)が12ptから9ptになると
それに対応してスタートアップスクリーンのフォントサイズも小さくなり、見やすくなるようです。
いろいろとお手数をかけてすみません、ありがとうございました。
オフライン