Hi Angelo,

Angelo Graziosi writes:
> The PDF is not rendere with Lucida console but, if I read corectly,
> with Courier New.
>
> Is this to be expected. How can I have a PDF with the font I have set
> as default in Emacs?

In short, yes that is expected.

You may want to look at the Variables in the customization group
ps-print-face, particularly ps-font-family and ps-font-info-database.
(M-x customize-group RET ps-print-font RET).  More options at the end.

Background: PostScript and PDF use a rather low-level interface for text
and fonts.  This translates to a lot of work that an application has to
do, if it wants to use PostScript to achieve effects that are expected
from users nowadays.  This work has not been done in Emacs yet.

Emacs just uses the shortcuts that PostScript provides, which means:

* The only fonts that can be selected are those already installed by
  default on all PostScript printers (see ps-font-info-database).
  (Unless you have a printer where additional fonts can be installed
  outside of Emacs.)

* No rendering of characters outside of ISO8859-1, because that is what
  those fonts have.

* I believe Emacs does the line wrapping itself, but does not actually
  know the metrics of the fonts that exist on the printer, so that
  assumes a fixed-width font.

Given, that you are using ps2pdf, your "printer" is actually
Ghostscript, I think.  It might be possible to specify a TrueType font
file as the font family and make Ghostscript include that font
automatically in the PDF.  But I do not know the syntax for that, or if
it is possible at all without adapting the Emacs code.

Another option is using some other external plain text formatting tool
like Enscript (or ask your favorite search engine ;-)).

HTH, benny

Reply via email to