9

Problem solved

I decided to use a scale customized font named Ricty. It was a easier way.

--

I'm setting Emacs font size by using face-font-rescale-alist like followings.

(create-fontset-from-ascii-font "Inconsolata-12:weight=normal:slant=normal" nil "myfavoritefontset")
(set-fontset-font "fontset-myfavoritefontset"
          'japanese-jisx0208
          (font-spec :family "TakaoExGothic" :size 12)
          nil
          'append)
(add-to-list 'default-frame-alist '(font . "fontset-myfavoritefontset"))
(setq face-font-rescale-alist
    '(("^-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)
      ("-cdac$" . 1.3)
      (".*Inconsolata.*" . 1.0)))

from http://d.hatena.ne.jp/shammer/20120811/1344701212

To check the size of font I restart Emacs each time when I change the values.

How can I refresh font size without restarting Emacs?

Drew
  • 29,895
  • 7
  • 74
  • 104
ironsand
  • 14,329
  • 17
  • 83
  • 176

2 Answers2

2

You can highlight the expression that you want to evaluate and do M-x eval-region RET

jh314
  • 27,144
  • 16
  • 62
  • 82
  • Thanks for reply. I evaluated the variable `face-font-rescale-alist`. But the size of fonts does not change. I think I need to evaluate some function to reflect the change. – ironsand Aug 11 '13 at 19:50
1

Here's what I use:

(global-set-key (kbd "<f2> g") 'text-scale-increase)
(global-set-key (kbd "<f2> l") 'text-scale-decrease)
abo-abo
  • 20,038
  • 3
  • 50
  • 71