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

Re: Postscript emulation



In article <5gskdv$of6@uni.library.ucla.edu>,  <pubpc1@library.ucla.edu> wrote:
>How difficult would it be to write a printer driver that
>contains a Postscript rasterizer? 

   Your terminology is getting mixed up. On the GS, the printer driver
accepts Quickdraw II commands to draw into a port, and then takes that
port and puts it to paper. Quickdraw supports font drawing, dropping
over a bitmap or few, etc. You do not feed a printer driver postscript
directly without (1) bypassing all the rules for printer drivers, (2)
rasterizing it at the application level and sending the driver a bitmap,
or something else.

   An application to do the rendering is already written for unix,
look up the program 'ghostscript'.  Supports plenty of 'bitmap'
printers already (deskjets, etc).  Already widely used in the linux
community to do exactly what you suggest.

   I don't think there's a port of it for the GS, even with GNO/ME,
and the simplest reason is the following 3 letters: GNU. Ghostscript
is a GNU program, which means that source code is freely available,
yadda yadda yah. The problem is that the source code is (1) usually
incomprehensible, and (2) assumes all sorts of things about your
system, such as (A) memory limits essentially don't exist (i.e. lots
of swap space available), (B) stack space limits don't exist, (C) all
ints are 32 bits, and pointers and integers are interchangeable, (D)
you're running on a unix workstation. Most to all of these conditions
are not valid on the GS.

   Ghostscript *may* be a nicely written GNU program, but by their
track record, I'd doubt it. [There's also the consideration that
postscript uses a lot of floating point #s when rasterizing, which'd
be glacial on most GSs] 

   If someone's willing to actually take a look at the ghostscript
source code, drop by prep.ai.mit.edu, pub/gnu/ghostscript-3.33.tar.gz
(1.6MB after compression). Have fun.

Nathan Mates


--
<*> Nathan Mates http://www.visi.com/~nathan/      <*>
# What are the facts? Again and again and again-- what are the _facts_?
# Shun wishful thinking, avoid opinion, care not what the neighbors
# think-- what are the facts, and to how many decimal places?  -R.A. Heinlein