Created
April 10, 2012 04:00
-
-
Save saiten/2348239 to your computer and use it in GitHub Desktop.
フォント設定
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; フレームのフォントを設定 | |
(let* ((font-set-name "myfonts") | |
(size 10) ; ASCIIフォントのサイズ [9/10/12/14/15/17/19/20/...] | |
(asciifont "Monaco") ; ASCIIフォント | |
(jpfont "Hiragino Kaku Gothic Pro") ; 日本語フォント | |
(h (* size 10)) | |
(fontspec (font-spec :family asciifont)) | |
(jp-fontspec (font-spec :family jpfont))) | |
(set-face-attribute 'default nil :family asciifont :height h) | |
(set-fontset-font nil 'japanese-jisx0213.2004-1 jp-fontspec) | |
(set-fontset-font nil 'japanese-jisx0213-2 jp-fontspec) | |
(set-fontset-font nil 'katakana-jisx0201 jp-fontspec) ; 半角カナ | |
(set-fontset-font nil '(#x0080 . #x024F) fontspec) ; 分音符付きラテン | |
(set-fontset-font nil '(#x0370 . #x03FF) fontspec) ; ギリシャ文字 | |
) | |
(add-to-list 'default-frame-alist '(font, "fontset-myfonts")) | |
;; フォントサイズの比を設定 | |
(dolist (elt '(("^-apple-hiragino.*" . 1.2) | |
(".*osaka-bold.*" . 1.2) | |
(".*osaka-medium.*" . 1.2) | |
(".*courier-bold-.*-mac-roman" . 1.0) | |
(".*monaco cy-bold-.*-mac-cyrillic" . 0.9) | |
(".*monaco-bold-.*-mac-roman" . 0.9))) | |
(add-to-list 'face-font-rescale-alist elt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment