ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Alexej Kryukov <akrioukov@mail.ru>
To: community@altlinux.ru
Subject: Re: [Comm] Печать в Emacs.
Date: Thu, 9 Oct 2003 15:09:03 +0400
Message-ID: <200310091509.03203.akrioukov@mail.ru> (raw)
In-Reply-To: <20031009094303.62d06626.kirey@mmk.ru>

On Thursday 09 October 2003 07:43, Alexander Kirey wrote:
> Здравствуйте!
>
> После установки Emacs, при попытке распечатать buffer
> по команде C-u M-x ps-print-buffer:
> $ emacs -nw
> Fatal error (11).Segmentation fault
>
> При самой печати был запрос к ps-print.elc, как я успел заметить.
> только он почему-то был сжат ps-print.elc.bz2.

Давно не имел дела с AltLinux, поэтому не знаю, почему он оказался
упакованным. Никогда такого не видел.

> И еще, спотыкается на русском тексте:
> font for characters not found, continue anyway? (y or n)
>
> Как его научить понимать русский текст?
> Emacs использует ghostscript? 

да.

> и если использует, то почему
> не находит путь к фонтам ghostscript, или что-то я не правильно
> понимаю...

Просто шрифты для печати в emacs задаются отдельно, они не зависят
от экранных. Можно использовать либо именно шрифты ghostscript
(но тогда ghostscript действительно должен о них знать, в документ
они не встраиваются), либо растровые bdf (не pcf, а именно
некомпилированные bdf), но тогда они должны быть налицо и путь
к ним должен быть указан. Делается это так (фрагмент из моего
.emacs):

;; Загрузить это хозяйство явным образом, иначе
;; при автозагрузке будут сбиты настройки
(require 'mule-util)
(require 'mule)
(require 'ps-print)
(require 'ps-bdf)

;; Указываем, где искать bdf-шрифты
(setq bdf-directory-list
      (cons "~/fonts/bdf/latin1" bdf-directory-list))
(setq bdf-directory-list
      (cons "~/fonts/bdf/cyrillic" bdf-directory-list))

;; Только для win32
(if (memq system-type '(ms-dos windows-nt))
    (setq w32-bdf-filename-alist (w32-find-bdf-fonts
     bdf-directory-list)))

;; Настройки печати
(setq ps-print-color-p 'black-white)
(setq ps-use-face-background nil)
(setq ps-paper-type 'a4)
(setq ps-font-size 10)
(setq ps-print-control-characters nil)

(setq ps-multibyte-buffer nil)

;; Для печати bdf-шрифтами -- должны быть указаны точные имена файлов.
;; Кириллические шрифты должны быть в кодировке iso-8859-5!
;; Шрифты надо брать не меньше 12x24, иначе будет смотреться совсем
;; плохо.
(setq ps-mule-font-info-database-default
   '((ascii (normal bdf "12x24.bdf" nil 1))
    (latin-iso8859-1 (normal bdf "12x24.bdf" iso-latin-1 1))
    (cyrillic-iso8859-5 (normal bdf "12x24cyr.bdf" cyrillic-iso-8bit
     1))))

;; А вот так -- для шрифтов Ghostscript. Нужно указать имена шрифтов
;; ghostscript, как они указаны в Fontmap.GS.
(setq ps-mule-font-info-database-default
   '((ascii (normal builtin "Times-Roman" nil 1))
    (latin-iso8859-1 (normal builtin "Times-Roman" iso-latin-1 1))
    (cyrillic-iso8859-5 (normal builtin "Times-Roman" cyrillic-iso-8bit
     1))))


Возможно, что-то пропустил, но в принципе печать из-под emacs
настраивают именно так.



      parent reply	other threads:[~2003-10-09 11:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-09  3:43 Alexander Kirey
2003-10-09  6:19 ` Maxim Tyurin
2003-10-09 11:09 ` Alexej Kryukov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200310091509.03203.akrioukov@mail.ru \
    --to=akrioukov@mail.ru \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git