[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: emacs21 & fonts



Denis Danilov <danilovdenis@yandex.ru> writes:

> Подскажите как правильно задать шрифт для emacs21

у меня выглядит так:

. установлены все True Type фонты до которых ручки добрались
  (Webfonts и от виндузы)

. локаль ru_RU.KOI8-R (LC_MESSAGES=C, натурально, я не мазохист)

. в .Xdefaults/.Xresources вообще ничего про Emacs нет

. в .emacs:

;; fontset for everything except for the menus
(defconst cmm-fontset-regular
  (create-fontset-from-fontset-spec
   "-monotype-courier new-medium-r-normal-*-16-*-*-*-*-*-cmm-regular, cyrillic-iso8859-5:-monotype-courier new-medium-r-normal-*-16-*-*-*-*-*-iso8859-5"
   t t))

;; fontset for the menus
(defconst cmm-fontset-menu
  (create-fontset-from-fontset-spec
   "-monotype-times new roman-bold-r-normal-*-14-*-*-*-*-*-cmm-menu, cyrillic-iso8859-5:-monotype-times new roman-bold-r-normal-*-14-*-*-*-*-*-iso8859-5"
   t t))

;; need to tell Emacs to use my fontset in all frames, since by default it
;; has its own strange ideas
(defconst cmm-+frame-alist+
  '((font . "-monotype-courier new-medium-r-normal-*-16-*-*-*-*-*-cmm-regular")))
(setq initial-frame-alist cmm-+frame-alist+)
(setq default-frame-alist cmm-+frame-alist+)

;; you could set "Cyrillic-KOI8" language environment, but then
;; cut-and-paste to/from other programs won't work.  I really tried
;; to understand the logic and failed.
(set-language-environment "Cyrillic-ISO")

;; create cp1251 coding system
(codepage-setup 1251)
(define-coding-system-alias 'windows-1251 'cp1251)

;; this is for Gnus, mostly:
(put-charset-property 'cyrillic-iso8859-5 'preferred-coding-system 'koi8-r)

;; this works only in Emacs from CVS, not vanilla Emacs 21:
(custom-set-variables '(utf-fragment-on-decoding t))

. если работаете с файлами в кодировке koi8, то будет разумно ещё и
  вот такое (непроверено!):

(setq default-buffer-file-coding-system 'cyrillic-koi8)

-- 
The whole idea of modules is so separatist, anyway.  Can't we all just
get along?                                               -- Jim Blandy



Reply to: