Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to refresh font setting without restart Emacs?

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?

like image 330
ironsand Avatar asked Aug 05 '13 07:08

ironsand


1 Answers

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

like image 129
jh314 Avatar answered Oct 18 '22 19:10

jh314