Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pretty multilingual PostScript printing?

12 views
Skip to first unread message

cmr....@gmail.com

unread,
Jan 18, 2009, 1:38:16 PM1/18/09
to
Hello group!

I'm enjoying Emacs 23.1 under Debian GNU/Linux testing, my locale is
ru_RU.UTF-8, and I use CUPS for printing. My problem is that I can't
get non-latin text printed nicely.

To reproduce:

1) C-h h; the 'Hello' buffer shows up. I see *all* the characters (I
have the TTF version of unifont installed).

2) M-x ps-print-buffer-faces; the buffer is printed, but every
non-latin character is replaced with '?'.

I've tried installing BDF fonts, and it helps meaning that at least
cyrillic characters get printed. But the quality of the BDF fonts is
unacceptably bad (because of low resolution it seems) and the printed
text is pain to read.

On the other hand, if the 'Hello' buffer contents are printed via
GEdit, all the characters appear smooth and nice.

I expect Emacs to be at least as good as GEdit ;-) Is the a way to
make Emacs use the installed *vector* fonts for PostScript printing,
like GEdit does?

I'm ready to provide any additional info,
Andrey

Eli Zaretskii

unread,
Jan 19, 2009, 1:32:44 PM1/19/09
to help-gn...@gnu.org
> From: "cmr....@gmail.com" <cmr....@gmail.com>
> Date: Sun, 18 Jan 2009 10:38:16 -0800 (PST)

>
> 1) C-h h; the 'Hello' buffer shows up. I see *all* the characters (I
> have the TTF version of unifont installed).
>
> 2) M-x ps-print-buffer-faces; the buffer is printed, but every
> non-latin character is replaced with '?'.
>
> I've tried installing BDF fonts, and it helps meaning that at least
> cyrillic characters get printed. But the quality of the BDF fonts is
> unacceptably bad (because of low resolution it seems) and the printed
> text is pain to read.

Did you read the commentary in ps-mule.el and tried to follow its
advice? There are several relevant options to customize that are
described there; perhaps one of them will solve your problem.


cmr....@gmail.com

unread,
Jan 21, 2009, 1:27:22 PM1/21/09
to
On 19 янв, 21:32, Eli Zaretskii <e...@gnu.org> wrote:
> Did you read the commentary in ps-mule.el and tried to follow its
> advice?  There are several relevant options to customize that are
> described there; perhaps one of them will solve your problem.

No I didn't, but now I've spent some time studying the file; it didn't
help me at all though :-( There are indeed much explanations there but
I don't see how any of it is applicable to my problem. The thing I
fail to see is why all that complications are needed (the GEdit didn't
ask me *anything* about fonts, and has printed the text nicely).

Please note that I'm very bad at elisp and even worse at PostScript,
so I readily believe that there may be no problem at all for more
experienced people. I also do bevieve there may be a reason for such
non-trivial printing configuration system.

I think my problem is quite common. Does anybody in this group have
his/her Emacs printing system configured in such a way that (at least
the most of) the 'Hello' buffer prints nicely, not worse than in
GEdit?

Andrey

Kevin Rodgers

unread,
Jan 21, 2009, 9:23:22 PM1/21/09
to help-gn...@gnu.org
cmr....@gmail.com wrote:
> I expect Emacs to be at least as good as GEdit ;-) Is the a way to
> make Emacs use the installed *vector* fonts for PostScript printing,
> like GEdit does?

I don't know -- how does GEdit do it?

--
Kevin Rodgers
Denver, Colorado, USA

Eli Zaretskii

unread,
Jan 21, 2009, 11:04:39 PM1/21/09
to help-gn...@gnu.org
> From: "cmr....@gmail.com" <cmr....@gmail.com>
> Date: Wed, 21 Jan 2009 10:27:22 -0800 (PST)

>
> Please note that I'm very bad at elisp and even worse at PostScript,
> so I readily believe that there may be no problem at all for more
> experienced people.

Can you tell what scripts are supported by your PostScript printer?


cmr....@gmail.com

unread,
Jan 22, 2009, 12:12:28 PM1/22/09
to
On 22 янв, 07:04, Eli Zaretskii <e...@gnu.org> wrote:
> Can you tell what scripts are supported by your PostScript printer?

I'm not sure what do you mean by "scripts"? I've printed the test
example we are discussing on my HP LaserJet 1018 and on a virtual PDF
printer (the latter is only available in GNOME print dialog, not via
CUPS). In both cases, GEdit was able to produce very smooth output.

Andrey

cmr....@gmail.com

unread,
Jan 22, 2009, 2:44:08 PM1/22/09
to
On 22 янв, 05:23, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:

I've looked through the GEdit code, and it turns out that it uses
standard GTK+ printing facilities. Emacs is built with GTK+ interface
for quite some time now, so I suppose there should be no architectural
problem in using GTK+ for printing as well. Please correct me if I'm
wrong.

Do you think it is feasible to implement GTK+ printing in Emacs? I
believe it will deliver great user experience improvement, for many
users.

Andrey

Eli Zaretskii

unread,
Jan 23, 2009, 6:59:29 AM1/23/09
to help-gn...@gnu.org
> From: "cmr....@gmail.com" <cmr....@gmail.com>
> Date: Thu, 22 Jan 2009 09:12:28 -0800 (PST)

>
> > Can you tell what scripts are supported by your PostScript printer?
>
> I'm not sure what do you mean by "scripts"?

A "script" is the way a language is represented in writing, or a
system of characters used to write on or more languages. Example of
scripts include: Cyrillic, Devanagari, Ethiopic, Greek, Han, Hangul,
Hebrew, and IPA.


cmr....@gmail.com

unread,
Jan 23, 2009, 2:13:15 PM1/23/09
to
On 23 янв, 14:59, Eli Zaretskii <e...@gnu.org> wrote:
> > From: "cmr.P...@gmail.com" <cmr.P...@gmail.com>

Maybe I'm missing something, but I think the answer can be found in
the very first message in this thread. I can print symbols from *any*
script found in Emacs 'Hello' buffer via GEdit (I have Unifont
installed). Thus, my printer supports *any* script.

Here are some facts that may be relevant to your question:

1) My HP LaserJet 1018 printer uses foo2zjs driver (http://
foo2zjs.rkkda.com/). This driver utilizes Ghostscript to perform all
of the image processing.

2) Ghostscript can use the character rasterizer provided by the
underlying operating system and window system; specifically, Adobe
Type Manager (ATM) or a TrueType rasterizer under MS Windows, or the
facilities provided by X Windows. (excerpt from the Ghostscript
manual)

Looking forward to your reply,
Andrey

Eli Zaretskii

unread,
Jan 23, 2009, 5:46:53 PM1/23/09
to help-gn...@gnu.org
> From: "cmr....@gmail.com" <cmr....@gmail.com>
> Date: Fri, 23 Jan 2009 11:13:15 -0800 (PST)

>
> Maybe I'm missing something, but I think the answer can be found in
> the very first message in this thread. I can print symbols from *any*
> script found in Emacs 'Hello' buffer via GEdit (I have Unifont
> installed). Thus, my printer supports *any* script.
>
> Here are some facts that may be relevant to your question:
>
> 1) My HP LaserJet 1018 printer uses foo2zjs driver (http://
> foo2zjs.rkkda.com/). This driver utilizes Ghostscript to perform all
> of the image processing.
>
> 2) Ghostscript can use the character rasterizer provided by the
> underlying operating system and window system; specifically, Adobe
> Type Manager (ATM) or a TrueType rasterizer under MS Windows, or the
> facilities provided by X Windows. (excerpt from the Ghostscript
> manual)
>
> Looking forward to your reply,

I don't know how to solve the problem of *any* script, and the above
information unfortunately doesn't help me help you. If you can start
with a single script, I can try telling you how to customize variables
in ps-mule.el to have that script printed, assuming your printer has
the necessary fonts built into it.

Alternatively, you could set up ps-print to pipe its output into
Ghostscript by customizing ps-lpr-command and ps-lpr-switches to
invoke Ghostscript.


cmr....@gmail.com

unread,
Jan 24, 2009, 1:33:05 AM1/24/09
to
On 24 янв, 01:46, Eli Zaretskii <e...@gnu.org> wrote:
> Alternatively, you could set up ps-print to pipe its output into
> Ghostscript by customizing ps-lpr-command and ps-lpr-switches to
> invoke Ghostscript.

This sounds like a more feasible approach. Could you be so kind to
tell me what values of 'ps-lpr-command' and 'ps-lpr-switches' should I
use? If not, any link to the relevant documentation appreciated.

Thanks for your patience,
Andrey

Eli Zaretskii

unread,
Jan 24, 2009, 4:55:23 AM1/24/09
to help-gn...@gnu.org
> From: "cmr....@gmail.com" <cmr....@gmail.com>
> Date: Fri, 23 Jan 2009 22:33:05 -0800 (PST)

>
> > Alternatively, you could set up ps-print to pipe its output into
> > Ghostscript by customizing ps-lpr-command and ps-lpr-switches to
> > invoke Ghostscript.
>
> This sounds like a more feasible approach. Could you be so kind to
> tell me what values of 'ps-lpr-command' and 'ps-lpr-switches' should I
> use? If not, any link to the relevant documentation appreciated.

The Emacs manual includes in the node "Windows Printing" an example of
how to set this up. That description is Windows-oriented, but I think
you will need only minimal changes to adapt it to your system,
probably just the name and full path to the Ghostscript executable.


cmr....@gmail.com

unread,
Jan 24, 2009, 5:03:01 PM1/24/09
to
On 24 янв, 12:55, Eli Zaretskii <e...@gnu.org> wrote:
> > From: "cmr.P...@gmail.com" <cmr.P...@gmail.com>

I've followed your advice, but unfortunately it didn't help. The
problem remains even if I just dump the Emacs output to a ps file via
cat-like 'ps-lpr-command'. So, the problem has nothing to do with the
printer. It seems that GEdit performs the rasterization of the image
on the "client" side, while Emacs always relies on the printer
capabilities.

Well, anyway, thanks for the support. I think I'll be able to survive
without Emacs printing :-) At least, I could live without it
before ;-) Thanks to the Unicode, one can always use some external
application like GEdit for the hardcopy production (well, in case he/
she doesn't need Emacs font-lock). I just hoped that someone already
has a solution.

Good luck,
Andrey

0 new messages