home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / ghostscr / bug / 1410 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.3 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!aladdin.COM!ghost
  2. From: ghost@aladdin.COM (L. Peter Deutsch)
  3. Newsgroups: gnu.ghostscript.bug
  4. Subject: Ghostscript & Distillery
  5. Date: 25 Jan 1993 20:52:28 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 50
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-ghostscript@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <9301242148.0.UUL1.3#5127@aladdin.com>
  12. Reply-To: ghost@aladdin.com
  13.  
  14. Several people have reported Ghostscript failing in various ways on
  15. the "Distillery".  Last September, a user finally sent me a minimal
  16. test case:
  17.     %!
  18.     /Times-Roman findfont 24 scalefont setfont
  19.     10 10 moveto (foo) show
  20.     showpage
  21. which failed to produce a findfont or setfont in the output.
  22.  
  23. The problem with still.ps is that it relies on a property of Adobe
  24. implementations that is not documented in the first Red Book, namely,
  25. that scalefont makes additional entries in the scaled font directory,
  26. called OrigFont and ScaleMatrix.  (Actually, still.ps appears only to
  27. rely on ScaleMatrix.)  Ghostscript does not implement these entries.
  28.  
  29. I patched Ghostscript to implement these entries, and still.ps now
  30. produces correct output for this test case.  The following patch will
  31. do the trick (insert at the end of gs_fonts.ps):
  32.  
  33. -------------------------------- BEGIN --------------------------------
  34.  
  35. % Redefine scalefont and makefont to implement OrigFont and ScaleMatrix.
  36.  
  37. /makefont
  38.  { exch dup dup length 2 add dict copy    % matrix, oldfont, newfont
  39.    dup /OrigFont known not { dup /OrigFont 3 index put } if
  40.    dup /ScaleMatrix known
  41.     { 2 index 1 index /ScaleMatrix get matrix concatmatrix }
  42.     { 2 index }
  43.    ifelse 1 index /ScaleMatrix 3 -1 roll put
  44.    readonly exch pop exch makefont
  45.  } bind odef
  46. /scalefont { [ exch 0 0 2 index 0 0 ] makefont } bind odef
  47.  
  48. -------------------------------- END --------------------------------
  49.  
  50. Of course, I'm guessing at what these entries are supposed to do, but
  51. for the simple test case, ScaleMatrix seemed to be appropriate.
  52.  
  53. I can't guarantee that this will fix all the problems with the
  54. Distillery, so I'd like to hear from anyone who still has problems
  55. after adding this patch.
  56.  
  57. L. Peter Deutsch :: Aladdin Enterprises :: P.O. box 60264, Palo Alto, CA 94306
  58. ghost@aladdin.com, ...decwrl!aladdin!ghost ; voice 415-322-0103 ; fax 322-1734
  59.         "Implementation is the sincerest form of flattery."
  60.  
  61.  
  62.  
  63.  
  64.