The importing fonts to CUPS saga continues.  Please bear with me -
this has turned into quite an essay.  

There must be somebody here who understands how CUPS references Type1
fonts.  I have a problem which has resisted solution for well over two
years now.  No help from the CUPS documentation, which comes in eleven
volumes, nor from www.linuxprinting.org, or from any other source.
Linux Format Magazine has refused to respond to two enquiries about
this, nor has anybody on this list responded to previous pleas for
help.  I post this in the hope that some expert might be browsing the
list and willing to shine a little light on this shadowy corner of the
UNIX world.  Any answer needs to be useful in the context of Mandrake
and portable from 8.2 to 9.* - I gather that there has been a recent
change in the way that CUPS and Ghostscript interact.

My specific problem is adding more typefaces to PostScript files
generated from one of my home grown applications; i.e. the file might
reference Andale Mono, Verdana, Tahoma, Densmore or whatever.  Yes, I
do have a Window$ licence, OS not installed.  These are all available
to X and to OpenOffice.org but not apparently to CUPS, and CUPS does
not appear to have a regular mechanism for importing fonts.
Presumably everything has to be done by hand.  I have converted the
TrueType fonts to Type1 .pfb files and placed these in the
/usr/share/cups/fonts directory under the names, for example Verdana,
AndaleMono, Verdana-Bold, etc, in imitation of the existing font names
(and restarted CUPS) but they still print as the default Courier
typeface.  The default set of fonts are listed in the PPD file in
/etc/cups/ppd but it is not clear how font information should be added
to this file.  The meaning of the various fields is not documented.
 
This may all be nonsense.  Maybe the font files should go somewhere in
the Ghostscript font path together with fonts.dir, fonts.scale and
fonts.alias files.  I really don't have a clue.

Before I sign off, this is my impression of how CUPS works:

lpr -> CUPS -> GS filter       PPD
                   |            |
                   |            |
               pstoraster -> driver
                                |
                                |
                             spooler? -> printer
  
This again may be wrong.  Please correct me somebody.

In words; a postscript file, for instance, is given to lpr aka
lpr-cups which passes it on to Ghostscript for filtering (if it were
raw text it would be converted to PostScript format).  If the printer
is not PostScript capable, the file is fed to the rasterization
section which generates a bitmap of the printed page.  This then goes
to a printer specific driver which converts it into a series of
graphics commands native to the printer.  The driver may consult the
PPD file for defined or allowed options as well and the result is
delivered to the spooler which stores it on disk for a while before
it, or some other daemon, dumps it to the printer.

Somewhere in there the system must try to locate the font resource
specified in the PostScript file, but where exactly, and what form
does the resource take?

All this has taken up far more than the 3.5 minutes I have to spare
each day (and I am not kidding) so help would be appreciated and would
surely be of interest to other members of the list.


-- 
Len Lawrence
----------------------------------------------------------
Opportunities are usually disguised as hard work, so most people don't
recognize them.
----------------------------------------------------------

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to