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.)

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

1 Answer 1

3

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.

2
  • Now it displays boxes: a screenshot Commented Sep 23, 2015 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. Commented Sep 23, 2015 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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