3

For example, if I set a default frame font to Terminus:

ELISP> (version)
"GNU Emacs 24.5.1 (i686-pc-mingw32)\n of 2015-04-11 on LEG570"

ELISP> (add-to-list 'default-frame-alist '(font . "Terminus-10"))
((font . "Terminus-10")
 (height . 45)
 (vertical-scroll-bars . left))

then open a new frame, switch to *scratch* buffer & type something in Ukrainian, Emacs suddenly uses Consolas font for the typed text:

A screenshot of a Emacs *scratch* buffer

How do I force Emacs to use Terminus font for Cyrillic characters too? (Terminus supports Cyrillic for sure, because I use it in the Cygwin terminal & it works fine there.)

  • Have you looked at how to globally change font? Or is this a problem with just that particular font? – Emacs User Sep 23 '15 at 11:45
  • Apparently, it's only Terminus. I found no problems with 'Courier New' or 'Liberation Mono'. – Alexander Gromnitsky Sep 23 '15 at 12:48
2

You should be able to use set-fontset-font to force emacs to use a specified font for a given range of characters.

(set-fontset-font "fontset-default"
                  (cons (decode-char 'ucs #x0400)
                        (decode-char 'ucs #x052F))
                  (font-spec :size 10 :name "Terminus"))

More information about Font Sets can be found in the emacs wiki. The range of unicode characters above should correspond to the "Cyrillic" and "Cyrillic Supplements" unicode blocks, as listed in the relevant Wikipedia article.

  • Now it displays boxes: a screenshot – Alexander Gromnitsky Sep 23 '15 at 12:47
  • It looks like you have a problem with Terminus itself. Maybe the font wasn't installed correctly... But in any case, even when forced, Emacs doesn't manage to display Cyrillic characters with Terminus. Which also explains why it wouldn't use it in the first place. – ffevotte Sep 23 '15 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.