Searching the Korean web, I found that the following must be added to your ~/.emacs file:
This file contains 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
(defun xftp (&optional frame) | |
"Return t if FRAME support XFT font backend." | |
(let ((xft-supported)) | |
(mapc (lambda (x) (if (eq x 'xft) (setq xft-supported t))) | |
(frame-parameter frame 'font-backend)) | |
xft-supported)) | |
(when (xftp) | |
(let ((fontset "fontset-default")) | |
(set-fontset-font fontset 'latin | |
'("DejaVu Sans Mono" . "unicode-bmp")) | |
(set-fontset-font fontset 'hangul | |
'("NanumGothic" . "unicode-bmp")) | |
(set-face-attribute 'default nil | |
:font fontset | |
:height 110))) |
The next thing I needed to do was enable Korean (Hangul) input in Emacs. Since I use ibus-hangul on my Linux machines, I thought I had to figure out how to get ibus to work with Emacs. But it turns out that Emacs has its own built-in IME!
You can invoke hangul input manually with
M-x set-input-method
(Meta/Alt x) followed by
korean-hangul
To toggle between English and Korean input, press C-\ (Ctrl-backslash)
To make korean-hangul the default input method, you can directly edit your ~/.emacs file under custom-set-variables and add the following:
'(default-input-method "korean-hangul")
Or you can do the same thing through the F10 -> Customize Emacs menu.
Note that you will not be able to switch between Korean and English in Emacs by pressing the Hangul key on Korean keyboards. You also will not be able to type traditional Chinese (hanja) characters with the Korean keyboard hanja key. To enter hanja characters, type the Korean characters you wish to convert to Chinese and then press F9 for a list of possible characters.
댓글 없음:
댓글 쓰기