[comp.sys.acorn] equasor => impression => psprinter => laserwriter => errors

mrp@minster.york.ac.uk (06/12/91)

Equasor => Impression => PSPrinter => LaserWriter => Errors!!

Postscript printing problems

The situation is I'm using Equasor (1.02) with Impression (2.10) to
produce fairly straightforward documents with equations.  All looks
fine on the screen and on my DeskJet but when I generate a Postscript
file from the printer driver and print this on an Apple Laserwriter
things go wrong.  I'm using the latest version of the printer drivers
(cant remember the version numbers but they've got new format dialogue
boxes).

On instruction from Computer Concepts I added the following to
the PSProlog file to map the Acorn mathgreek font (which equasor
uses) onto the postscript symbol font.  I've included lots of
postscript bits here in case any wise postscript hackers can spot 
what's up.

i) I added the symbol font to the top of the prolog file which
now looks like this:

  %!PS-Adobe-2.1
  %%Creator: PostScript PDriver module 2.42
  %%CreationDate: 12:19:48 Tue,11 Jun 1991
  %%Title: Impression
  %%Pages: (atend)
  %%BoundingBox: (atend)
  %%DocumentFonts: Courier Courier-Oblique Courier-Bold
  %%+ Courier-BoldOblique Helvetica Helvetica-Oblique Helvetica-Bold
  %%+ Helvetica-BoldOblique NewCenturySchlbk-Bold Times-Roman
  %%+ Times-Italic Times-Bold Times-BoldItalic
  %%+ NewCenturySchlbk-Roman NewCenturySchlbk-Italic 
  %%+ NewCenturySchlbk-BoldItalic Symbol
  %%+ AvantGarde-Book AvantGarde-BookOblique
  %%+ AvantGarde-Demi AvantGarde-DemiOblique
  %%+ Bookman-Demi Bookman-DemiItalic
  %%+ Bookman-Light Bookman-LightItalic
  %%+ Palatino-Roman Palatino-Italic
  %%+ Palatino-Bold Palatino-BoldItalic
  %%+ ZapfChancery-MediumItalic
  %%EndComments


ii) I inserted the following again near the top of the prolog,
near lots of similar stuff:

/EFF_SymbolEnc [ 
/.notdef /.notdef /.notdef /.notdef 
/.notdef /.notdef /.notdef /.notdef 
/.notdef /.notdef /.notdef /.notdef 
/.notdef /.notdef /.notdef /.notdef 
/.notdef /.notdef /.notdef /.notdef 
/.notdef /.notdef /.notdef /.notdef 
/.notdef /.notdef /.notdef /.notdef 
/.notdef /.notdef /.notdef /.notdef 
/space /exclam /second /numbersign 
/dollar /percent /ampersand /minute 
/parenleft /parenright /asteriskmath /plus 
/comma /minus /period /slash 
/zero /one /two /three 
/four /five /six /seven 
/eight /nine /colon /semicolon 
/less /equal /greater /question 
/dotmath /Alpha /Beta /Chi 
/Delta /Epsilon /Phi /Gamma 
/Eta /Iota /theta1 /Kappa 
/Lambda /Mu /Nu /Omicron 
/Pi /Theta /Rho /Sigma 
/Tau /Upsilon /sigma1 /Omega 
/Xi /Psi /Zeta /bracketleft 
/therefore /bracketright /Upsilon1 /underscore 
/.notdef /alpha /beta /chi 
/delta /epsilon /phi /gamma 
/eta /iota /phi1 /kappa 
/lambda /mu /nu /omicron 
/pi /theta /rho /sigma 
/tau /upsilon /omega1 /omega 
/xi /psi /zeta /braceleft 
/bar /braceright /similar /.notdef 
/braceex /bracelefttp /braceleftmid /braceleftbt 
/parenlefttp /parenleftex /parenleftbt /bracketlefttp 
/bracketleftex /bracketleftbt /.notdef /ellipsis 
/fraction /florin /perthousand /bullet 
/dotlogical /plusminus /copyrightserif /registerserif 
/trademarkserif /angle /infinity /.notdef 
/.notdef /.notdef /.notdef /apple 
/club /diamond /heart /spade 
/space /bracerighttp /bracerightmid /bracerightbt 
/parenrighttp /parenrightex /parenrightbt /bracketrighttp 
/bracketrightex /bracketrightbt /carriagereturn /notequal 
/equivalence /minus /approxequal /congruent 
/degree /plusminus /copyrightsans /registersans 
/trademarksans /angle1 /proportional /.notdef 
/.notdef /integraltp /integralex /integralbt 
/aleph /Ifraktur /Rfraktur /weierstrass 
/.notdef /.notdef /.notdef /.notdef 
/.notdef /lessequal /lessequal /.notdef 
/angleleft /integral /arrowhorizex /arrowboth 
/arrowleft /arrowup /arrowright /arrowdown 
/propersubset /reflexsubset /notsubset /propersuperset 
/notsubset /intersection /circlemultiply /multiply 
/emptyset /perpendicular /radical /gradient 
/existential /universal /product /summation 
/.notdef /.notdef /.notdef /.notdef 
/.notdef /greaterequal /greaterequal /.notdef 
/angleright /integral1 /arrowvertex /arrowdblboth 
/arrowdblleft /arrowdblup /arrowdblright /arrowdbldown 
/element /reflexsuperset /notelement /element 
/notelement /union /circleplus /divide 
/lozenge /parallel /radicalex /partialdiff 
/logicaland /logicalor /logicalnot /suchthat 
] def


iii) I added the following line to the bottom of the prolog
	/MathGreek /Symbol /EFF_SymbolEnc FF


Now when I send the generated postscript file to the printer I get 
the error:

%%[ Error: typecheck; OffendingCommand: copy ]%%

which is caused in this section of postscript (which appears in the
original prolog):

/fonts 100 dict def
/ChkCh {
  dup Encoding exch get
  CharStrings exch known {pop} {Encoding exch /.notdef put} ifelse
} bind def
/FF {
  3 1 roll
  findfont begin
    currentdict dup maxlength 1 add dict begin
      {1 index /FID ne {def} {pop pop} ifelse} forall
      /Encoding 3 -1 roll 256 array copy def
      /Metrics 1 dict def
      Metrics /.notdef 0 put
      0 1 255 /ChkCh load for
      dup currentdict
    end
  end
  definefont
  fonts 3 1 roll put                                             
} bind def

I posted a similar problem to this group a while ago which I
managed to hack by commenting out the line above with copy in it.
All seemed to work ok then.  When I do this now the errors just
seem to get worse.

When I reset the prolog to what it was everything works ok, but
the mathgreek font is obviously not recognised.  The man at
Computer Concepts who sent me the EFF table said they had done
all their testing of this on a Laserwriter so I'm a bit lost.

Any help at all appreciated.  The report I'm having problems
printing is due in on 30th June :-(

If anyone has got round this or does manage to print equasor
stuff on postscript printers can you send me your psprolog file
please ??

   - Martin

#===============================#===========================================#
| Martin Portman                | Phone: (0904) 432735                      |
| Dept. of Comp. Science        | JANET:  mrp@uk.ac.york.minster            |
| University of York            | UUCP: ...!mcsun!ukc!minster!mrp           |
| Heslington                    | ARPA:                                     |
| YORK YO1 5DD ENGLAND          | mrp%minster.york.ac.uk@nsfnet-relay.ac.uk |
#===============================#===========================================#
| 		C'mon Marty, you'll miss the bus, eh? - Lance 		    |
#===========================================================================#

bcockburn@acorn.co.uk (Bruce Cockburn) (06/13/91)

Martin,

  Your problem would seem to be the line

        /MathGreek /Symbol /EFF_SymbolEnc FF

  It should be 

        /MathGreek /Symbol EFF_SymbolEnc FF

  What you have written puts a literal (the name if you like) on the stack
where the FF procedure expects to find an array (the value if you like). 
The copy operator is being used to copy the values from an array, in this
case one of the encodings, into THE encoding array of the font being
created.  If it meets a literal and an array it is bound to give a typecheck
error.

  Bruce.