[R] Invalid font in bitmap()

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Apr 24 13:28:01 CEST 2003


It's a problem in your ghostscript installation. Your example works in
RH8.0, for example.

(BTW, it is nowadays AFPL ghostscript 8.x or GNU ghostscript 7.03 or
later.)

On Thu, 24 Apr 2003, Adaikalavan Ramasamy wrote:

> Dear all,
> 
> A few weeks ago I asked about X11() availability using CGI-perl. The
> general advice was to use bitmap which requires ghostscript (Xvnc and
> Xvbf were the other alternatives). My system administrator got around to
> installing Aladin Ghostscript 6.0 and the setting the R_GSCMD
> environment variable. Other system specification is given below.
> 
> 
> But now I have a new problem that says that font is invalid and this is
> not even through the CGI-perl web mode. As per the 'Family' section of
> postscript I tried experimenting with the various options given but with
> the same problem. Here is an example
> 
> ###### Code #######
> > x <- -10:10
> > bitmap("bitmaptest.png", family="URWGothic")
> > plot(x, x^2); title("A quadratic plot"); dev.off()
> Error: /invalidfont in findfont
> Operand stack:
>    URWGothicL-Book   Font   URWGothicL-Book   236230   URWGothicL-Book
> --nostringval--   NewCenturySchlbk-Roman   CenturySchL-Roma
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--
> --nostringval--   2   %stopped_push   --nostringval--   --nostringval--
> --nostringval--   false   1   %stopped_push   1   3   %oparray_pop
> .runexec2   --nostringval--   --nostringval--   --nostringval--   2
> %stopped_push   --nostringval--   1   3   %oparray_pop   2   3
> %oparray_pop   --nostringval--   --nostringval--   --nostringval--
> --nostringval--   --nostringval--   false   1   %stopped_push   5   4
> %oparray_pop   --nostringval--   --nostringval--   --nostringval--   1
> -1   1   --nostringval--   %for_neg_int_continue   --nostringval--
> --nostringval--
> Dictionary stack:
>    --dict:951/983(ro)(G)--   --dict:0/20(G)--   --dict:90/200(L)--
> --dict:16/24(G)--   --dict:951/983(ro)(G)--
> Current allocation mode is local
> Last OS error: 2
> Current file position is 1438
> Aladdin Ghostscript 6.0: Unrecoverable error, exit code 1
> ####################
> 
> 
> Can anyone help please ?
> 
> 
> 
> R Version 1.6.1  (2002-11-01)
> Aladdin Ghostscript 6.0
> R_GSCMD : /usr/local/bin/gs
> Platform: SunOS 
> Release : 5.8 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list