Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Emacs 23 on OS X, and I am able to change the font that is used for standard keyboard characters, but I've noticed that when I use non-English unicode characters (such as Japanese Kanji or Greek letters) the font used is different.

How can I change this fallback font to be the font of my choosing instead of whatever Emacs wants to use?

share|improve this question
up vote 4 down vote accepted

Here's how:

Figure out the character set the particular glyphs you want are in. You can do this using M-x list-character-sets. Then, assuming you don't have any super-advanced configuration going on, add something like this to your appropriate elisp file:

(set-fontset-font "fontset-default"
                  'greek-iso8859-7
                  '("Liberation Mono" . "iso10646-1"))

(set-fontset-font "fontset-default"
                  'japanese-jisx0208
                  '("Hiragino Kaku Gothic Pro" . "iso10646-1"))

If you need to make changes to account for size differences between fonts, here is a more complex snippet that takes a font-spec:

(set-fontset-font "fontset-default"
                  'japanese-jisx0208
                  (font-spec :family "Takaoゴシック" :size 16)) 
share|improve this answer
1  
This github package tries to offer a more general solution. It suggests some free fonts and tries to choose the correct font for non-ASCII characters more intelligently than emacs does by default: github.com/rolandwalker/unicode-fonts – algal Jul 11 '13 at 21:49
    
That package is cool, but it is quite the Golden Hammer compared to fixing one small set if that's what you need (and most people only need a small subset of the Unicode set) – Trevor Alexander Jun 3 '14 at 8:37

Try setting the default font: M-x menu-set-font. You have to make sure, that the font contains the Japanese characters. Not every font contains every character. If the font does not contain the characters, Emacs will use a font which contains them.

You can also try to customize a specific face with M-x customize-face.

share|improve this answer
    
Yes, I know that stuff. My question is how to specify what the font is that emacs falls back to for characters not available in my usual font-face. – iand675 May 9 '11 at 21:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .