From Ted.Harding@nessie.mcc.ac.uk  Mon Feb  1 17:58:27 1999
From: Ted.Harding@nessie.mcc.ac.uk ( (Ted Harding))
Date: Mon, 01 Feb 1999 17:58:27 -0000 (GMT)
Subject: PostScript bugs in R-0.63.1
In-Reply-To: <Pine.SUN.3.95.990201111153.607A-100000@paca>
Message-ID: <XFMail.990201175827.Ted.Harding@nessie.mcc.ac.uk>

On 01-Feb-99 Ben Bolker wrote:
> 
>   I have a minor problem with the PostScript generated by R-0.63.1.
>   Specifically, the files generated *will* work in:
> 
>     ghostview; on an HP LaserJet; on an Apple LaserWriter
> 
>   *will not* work in:
> 
>      ghostscript under xdvi; on a SPARCprinter
>  
>   The error message on the SPARCprinter was
> 
> Error: /invalidfont
> Command: 'definefont'
> Ostack: /Font5 /Font5 font(Symbol,1)
> Estack:
>   [and quite a bit more ...]

This looks (especially since it sometimes works & sometimes doesn't) like
a PostScript Level-1 vs Level-2 issue.

definefont:  key font definefont font
...
In Level-2 it is permissible to associate a font dictionary with more
than one key. If /font/ has already been registered, definefont does
not alter it in any way
(PostScript Language Ref Manual)

The "invalidfont" error can arise "on discovering that a font dictionary
is malformed".

I don't know the details of R's PS implementation; however, if it is
using definefont attempting to register more than one key for the Symbol
font then that would be consistent with your results. Ghostscript and
ghostview should both be able to handle Level-2; I'm not sure why
ghostscript under xdvi should not be able to (unless xdvi somehow
inhibits it). Apart from that, the observed behaviour is compatible with
HPLJ and AppleLW being Level-2, while the SPARCprinter is Level-1.

Good PostScript code tests the value of "languagelevel": OK if =2, else
if =1 or if undefined in systemdict then Level-2 features may not work
and alternative Level-1 code should be executed (and of course needs to
be supplied in the file ... ).

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding@nessie.mcc.ac.uk>
Date: 01-Feb-99                                       Time: 17:58:27
------------------------------ XFMail ------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


PostScript bugs in R-0.63.1
 (Ted Harding