home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / postscri / 6427 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  3.2 KB

  1. Xref: sparky comp.lang.postscript:6427 comp.periphs.printers:4020
  2. Newsgroups: comp.lang.postscript,comp.periphs.printers
  3. Path: sparky!uunet!news.univie.ac.at!iiasa.ac.at!iiasa!curry
  4. From: curry@iiasa.ac.at (Jim  CURRY)
  5. Subject: Bug in LJ-4M PS-processor
  6. Message-ID: <curry.727874143@iiasa>
  7. Sender: news@iiasa.ac.at
  8. Reply-To: curry@iiasa.ac.at
  9. Organization: IIASA, Laxenburg, Austria
  10. Date: Sun, 24 Jan 1993 11:15:43 GMT
  11. Lines: 56
  12.  
  13. I believe that there is an "arithmetic" bug in my LJ-4M's PS-processor.
  14.  
  15. The bug turned up in the output of a complex LaTeX-dvips document:
  16. the PS file prints correctly on an LJ-3 with HP-PS-cartridge,
  17. but on the LJ-4M, one character in a particular math formula prints
  18. in the wrong place -- it is shifted to the left by about 4cm.
  19.  
  20. I've isolated the bug, and reduced it to this simple self-contained code:
  21.  
  22. =========================================================================
  23. 72 300 div 72 300 div neg scale   300 -3000 translate  % set dvips coords
  24.  
  25. 412 1000  moveto   /xxx1 currentpoint pop 100 string cvs def
  26.  14    0 rmoveto   /xxx2 currentpoint pop 100 string cvs def
  27.   2    0 rmoveto   /xxx3 currentpoint pop 100 string cvs def
  28.  
  29. /Courier findfont [ 50 0 0 -50 0 0 ] makefont setfont 300 1200 moveto
  30. xxx1 show (  ) show xxx2 show (  ) show xxx3 show (  ) show  showpage
  31. =========================================================================
  32.  
  33. That is, set units to 1/300 inch, with y-origin at top of page;
  34. then just do an absolute move followed by two relative x-moves,
  35. recording the current x after each move.  (In the original code,
  36. the first "rmoveto" was actually a "show" of a char of width 14.)
  37. Print the three remembered x-values.  (The y-values don't matter.)
  38.  
  39. On my LJ-4M, the values are 412.0, 426.0, and then 940.0 (not 428.0)!
  40.  
  41. I say that this exhibits an "arithmetic" bug because the incorrect result
  42. depends sensitively on the x-values used and on the two rmoveto's.  
  43. Specifically, the final x-position becomes correct if I do any of:
  44.        (a)  replace "412" with "413" or "412.0001" or some random value,
  45.     or (b)  replace "2" with "1" or "3" or "2.0001" or some random value,
  46.     or (c)  replace the double "rmoveto" with a single "16 0 rmoveto",
  47.     or (d)  replace the "2 0 rmoveto" with "1 0 rmoveto  1 0 rmoveto".
  48.  
  49. Manufacturers' service departments in Austria are not always as competent
  50. as we'd like them to be.  So before I talk to HP, I'd like to know
  51. whether the bug exists on all LJ-4M's, or only in the version of the
  52. PS-processor installed on mine, or (conceivably) just on my printer.
  53.  
  54. So I'd appreciate it if a few people with LJ-4M's could run the above code
  55. and let me know whether the last number is right (428.0) or wrong (940.0),
  56. together with the firmware revision data (from the "SELF TEST" page).
  57. Mine are:  Formatter Number: S4601104CJ2     Firmware Datecode: 19920603
  58.            Installed Personalities: PCL (19920511)  POSTSCRIPT (19920610)
  59.  
  60. E-mail is probably best for responses; I'll post a report on the results.
  61.  
  62. Thanks in advance -- Jim
  63.  
  64.        Jim Curry                    ||  E-mail:    curry@iiasa.ac.at
  65.        International Institute for  ||  Telephone: +43-2236-71521-204
  66.           Applied Systems Analysis  ||  Telefax:   +43-2236-71313
  67.        A-2361 Laxenburg // Austria  ||  Telex:     079137 iiasa a
  68.  
  69.