Thread View: gnu.ghostscript.bug
1 messages
1 total messages
Started by L. Peter Deutsch
Tue, 26 Jan 1993 01:52
Ghostscript & Distillery
Author: L. Peter Deutsch
Date: Tue, 26 Jan 1993 01:52
Date: Tue, 26 Jan 1993 01:52
46 lines
2413 bytes
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."
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads