[Top][All Lists]

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

Re: Lout, Linux, and Postscript fonts

From: Valeriy E. Ushakov
Subject: Re: Lout, Linux, and Postscript fonts
Date: Sun, 24 Aug 1997 21:30:01 +0400

On Sun, Aug 24, 1997 at 12:00:48PM -0400, address@hidden wrote:

> Now it would seem I just need to download the .pfb font
> files to the printefor the non-resident fonts I would
> like to use in my document.
> How do I do this?  cat -ing the .pfb files to the device 
> doesn't work, nor does cat -ing the .pfb files with Lout's
> postscript output.  [cat -ing, from the verb to cat]
> There must be a simple utility somewhere.  Could someone
> please point me in the right direction?

There're two approaches.

    1. Download fonts to your printer.
    2. Include fonts in the lout output.

I don't know if you can do this with pfb fonts, consult the FM.  You
can certainly do this with pfa fonts.  pfbtops(1) that converts pfb
format to pfa format is distributed with groff.

1. Downloading fonts into printer.

Important thing to understand is that every postscript job sent to
printer is executed in a separate environment and the state of the
interpreter is restored upon job completion.  Thus if you simply send
a font to printer after the job is done all changes made by the job
(definition of new font in this case) are discarded.

To make this changes persistent you have to use special technique
described in Adobe technical note #5040 "Supporting Downloadable
PostScript Language Fonts".  You can find Adobe tech notes at

2. Including fonts into lout output.

Lout, being one of the most DSC-conformant formatters produces
"%%IncludeResource: font FontName" DSC comment for every font it uses.
Thus you can instruct your spooler to perform resource inclusion for
you automatically or do it manually yourself.  If your spooler allow
you to define input filters for print job, it's a good place to perform
resource inclusion.

Use PSUtils.  Among other very useful page utilities it contains
includeres script that process %%IncludeResource: DSC comments.
Check <URL:ftp://ftp.dcs.ed.ac.uk/pub/ajcd/> for the latest version.

BUT! Be cautious!  Lout place %%IncludeResource: comments into page
setup section, except for the fonts on the very first page, inclusion
of those fonts is required in document setup section.

This might has unfortunate effect of bloating you job for certain
usage patterns.  Let me refer to my experience with typesetting
Tibetan with lout.  Suppose I has a paper that has excerpts in Tibetan
sprinkled all over on every page.  Now lout will generate inclusion
request for Tibetan font I use in setup section of EVERY page.
Suppose my document is some 20 pages and the font (pfa) size is some
100K.  After performing all the substitutions I will end up with file
that is ~2M larger than original lout output.

Note well that this is NOT a lout failure.  Lout just can't insert
request for font inclusion into document setup section it has sent to
output ages ago.  Also, including every font you use in your document
into document setup may exhaust your printer VM.  Including fonts only
at the point it is actually uses saves memory as after the page is
printed restore is performed and printer VM occupied by the font is

Thus it's up to you to decide what is optimal in your particular case.
With my Tibetan example I slightly fix the lout output to include the
Tibetan font into the document setup.  A perl script that performs
generic reordering by user's request should be fairly simple to write,
meanwhile for my particular case I just use:

    sed -e '/^%%IncludeResource: font Tibetan-ModernX/ d' \
        -e '/^%%EndSetup/ {
    %%BeginResource: font Tibetan-ModernX
            r '"${tibmdx}"'

that removes %%IncludeResource: requests and inserts the font at the
end of the document setup.

Hope it helps.

SY, Uwe
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]