Mixing 6x13 fixed font and an antialiased Japanese font in Emacs 23
I have been using the 6x13 fixed font exclusively in terminals, Emacs, and anywhere else as long as I can configure to use it. The 6x13 is my most favorite font due to its beauty and practical form factor optimized for code development. Especially, using 6x13 with Emacs is crucial when I am writing code.
However, the 6x13 is not enough in my case; I routinely write Japanese, my native language, under Emacs. I haven't been paying much attention to Japanese fonts in Emacs since I use Japanese only in comments and documents. In Emacs 22, Japanese fonts basically look ugly. This is because they are not antialiased. But after I migrated to Emacs 23 that supports antialiased fonts by default, things have changed dramatically. They look amazingly beautiful (See the Figure).

Figure: 6x13 and antialiased Japanese font in Emacs 23.
So, now it is time to explicitly configure Emacs 23
- To use the 6x13 fixed font for ASCII characters.
- To use VL Gothic font with anti-aliasing for Japanese characters.
VL Gothic is nowadays one of the most popular Japanese TrueType fonts among Unix communities in Japan, I guess. To install it under Ubuntu, do
$ sudo apt-get install ttf-vlgothic
Next, insert the following snippet into .emacs.el located under home directory:
(add-to-list 'default-frame-alist '(font . "6x13"))
(cond
(window-system
(set-default-font "6x13")
(set-fontset-font
(frame-parameter nil 'font)
'japanese-jisx0208
'("VL Gothic" . "unicode-bmp"))
)
)
Note that the bold line is necessary. Otherwise, newly spawned frames (by C-x 5 2, for example) will start using something other than 6x13.
Finally, restart Emacs 23 and life is beautiful.
Appendix: Fixing slow Japanese input with anthy under Emacs23
I have been using anthy.el for Japanese input since Emacs22. After migrating to Emacs23, however, the response speed of Japanese input became unpleasantly slow. After searching for a solution, it turned out that we can get around the problem by editing .emacs.el file as follows:
(load-library "anthy") (if (>= emacs-major-version 23) (setq anthy-accept-timeout 1))
The bold part is lines to be added after loading Anthy library.
Reference: http://spalab.naist.jp/~yuu-t/wiki/index.php?anthy-el-emacs23
thanks it helped me!
thanks it helped me!
Re
Glad to hear that. Thanks for reading :-)