🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.ghostscript.bug
Article #607

Ghostscript & Distillery

#607
From: L. Peter Deutsch
Date: Tue, 26 Jan 1993 01:52
46 lines
2413 bytes
Several people have reported Ghostscript failing in various ways on
the "Distillery".  Last September, a user finally sent me a minimal
test case:
	%!
	/Times-Roman findfont 24 scalefont setfont
	10 10 moveto (foo) show
	showpage
which failed to produce a findfont or setfont in the output.

The problem with still.ps is that it relies on a property of Adobe
implementations that is not documented in the first Red Book, namely,
that scalefont makes additional entries in the scaled font directory,
called OrigFont and ScaleMatrix.  (Actually, still.ps appears only to
rely on ScaleMatrix.)  Ghostscript does not implement these entries.

I patched Ghostscript to implement these entries, and still.ps now
produces correct output for this test case.  The following patch will
do the trick (insert at the end of gs_fonts.ps):

-------------------------------- BEGIN --------------------------------

% Redefine scalefont and makefont to implement OrigFont and ScaleMatrix.

/makefont
 { exch dup dup length 2 add dict copy	% matrix, oldfont, newfont
   dup /OrigFont known not { dup /OrigFont 3 index put } if
   dup /ScaleMatrix known
    { 2 index 1 index /ScaleMatrix get matrix concatmatrix }
    { 2 index }
   ifelse 1 index /ScaleMatrix 3 -1 roll put
   readonly exch pop exch makefont
 } bind odef
/scalefont { [ exch 0 0 2 index 0 0 ] makefont } bind odef

-------------------------------- END --------------------------------

Of course, I'm guessing at what these entries are supposed to do, but
for the simple test case, ScaleMatrix seemed to be appropriate.

I can't guarantee that this will fix all the problems with the
Distillery, so I'd like to hear from anyone who still has problems
after adding this patch.

L. Peter Deutsch :: Aladdin Enterprises :: P.O. box 60264, Palo Alto, CA 94306
ghost@aladdin.com, ...decwrl!aladdin!ghost ; voice 415-322-0103 ; fax 322-1734
	    "Implementation is the sincerest form of flattery."
Technical Details
Message-ID: <9301242148.0.UUL1.3#5127@aladdin.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!aladdin.COM!ghost

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!aladdin.COM!ghost
From: ghost@aladdin.COM (L. Peter Deutsch)
Newsgroups: gnu.ghostscript.bug
Subject: Ghostscript & Distillery
Date: 25 Jan 1993 20:52:28 -0500
Organization: GNUs Not Usenet
Lines: 50
Sender: daemon@cis.ohio-state.edu
Approved: bug-ghostscript@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9301242148.0.UUL1.3#5127@aladdin.com>
Reply-To: ghost@aladdin.com