[bug-gs] Invalid font problem.

Ray Johnston ray.johnston@artifex.com
Mon, 16 Dec 2002 10:11:58 -0800


The problem appears to be that while the prefix was effective in
building and installing Ghostscript, you (and apparently others)
have not installed the ghostscript fonts within the same prefix.

Ghostscript, as you have built it with this install script, is
expecting the fonts in /app/ghostscript-8.00/share/ghostscript/fonts
as indicated by the information printed by gs -h

> Search path:
>    . : /app/ghostscript-8.00/share/ghostscript/8.00/lib :
>    /app/ghostscript-8.00/share/ghostscript/fonts

If previous versions of ghostscript were installed with the fonts
in the default location, they may exist on your system in
/usr/local/share/ghostscript/fonts.

Fonts are distributed (and installed) independently from GS since
they are provided by others (not Artifex Software or the developers
of Ghostscript).

Fonts will have the .pfb suffix, so a find . -name "*.pfb" -print
from some top level directory (such as /usr or /app) will locate
them for you. Then you can either:

   1) Symbolic link to the font directory as the expected dir
      for example:

	ln -s /usr/local/share/ghostscript/fonts
app/ghostscript-8.00/share/ghostscript/fonts

   2) Tell gs where to find the fonts using the -I option to
      add a search path. For example:

	gs -I/usr/local/share/ghostscript/fonts ...

   3) Set the GS_LIB environment variable to specify the dir
      For example (bin/sh or bin/ksh or bin/bash):

	export GS_LIB=/usr/local/share/ghostscript/fonts

Of course, if you don't already have the fonts installed, then do
so first.

Regards,
Ray Johnston
Artifex Software Inc.
____________________________________________________________________

jpiszcz wrote:
> 
> With ghostscript-8.00 installed into a custom prefix.
> 
> /configure --prefix=/app/ghostscript-8.00 ; make ; make install
> 
> A lot of people have this error on google, and yet nobody has an answer
> or way to fix,  I tried playing with the ENV vars but they didn't seem
> to help, any idea?
> 
> btw: they convert fine with ghostscript installed with my distribution
> 
> [war@war war]$ mv /app/ghostscript-8.00/ .
> [war@war war]$ relink
>   362 link(s) removed
> [war@war war]$ ls -l netscape3.ps
> -rw-r--r--    1 war      war          208k Dec 16 06:18 netscape3.ps
> [war@war war]$ /usr/bin/ps2pdf netscape3.ps
> [war@war war]$ ls -l netscape3.pdf
> -rw-r--r--    1 war      war           35k Dec 16 12:08 netscape3.pdf
> [war@war war]$ rm netscape3.pdf
> [war@war war]$ mv ghostscript-8.00 /app
> [war@war war]$ relink
>   362 link(s) installed
> [war@war war]$ vwhich ps2pdf
> /app/ghostscript-8.00/bin/ps2pdf
> /usr/bin/ps2pdf
> [war@war war]$ ps2pdf netscape3.ps
> Error: /invalidfont in findfont
> Operand stack:
>    F0   Times-Roman   Font   Times-Roman   215766   Times-Roman
> --nostringval--   Courier   NimbusMonL-Regu   (NimbusMonL-Regu)
> NimbusMonL-Regu   (NimbusMonL-Regu)   NimbusMonL-Regu
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--
> --nostringval--   2   %stopped_push   --nostringval--
> --nostringval--   --nostringval--   false   1   %stopped_push   1   3
> %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   1   3
> %oparray_pop   .runexec2   --nostringval--   --nostringval--
> --nostringval--   2   %stopped_push   --nostringval--   2   3
> %oparray_pop   3   3   %oparray_pop   --nostringval--
> --nostringval--   --nostringval--   --nostringval--   --nostringval--
> false   1   %stopped_push   6   4   %oparray_pop   --nostringval--
> --nostringval--   --nostringval--   5   -1   1   --nostringval--
> %for_neg_int_continue   --nostringval--   --nostringval--
> Dictionary stack:
>    --dict:1045/1123(ro)(G)--   --dict:0/20(G)--   --dict:71/200(L)--
> --dict:17/17(ro)(G)--   --dict:1045/1123(ro)(G)--
> Current allocation mode is local
> Last OS error: 2
> Current file position is 2504
> AFPL Ghostscript 8.00: Unrecoverable error, exit code 1
> [war@war war]$
> 
> [war@war war]$ ps2pdf netscape2.ps
> Error: /invalidfont in findfont
> Operand stack:
>    F0   Times-Roman   Font   Times-Roman   215956   Times-Roman
> --nostringval--   Courier   NimbusMonL-Regu   (NimbusMonL-Regu)
> NimbusMonL-Regu   (NimbusMonL-Regu)   NimbusMonL-Regu
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--
> --nostringval--   2   %stopped_push   --nostringval--
> --nostringval--   --nostringval--   false   1   %stopped_push   1   3
> %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   1   3
> %oparray_pop   .runexec2   --nostringval--   --nostringval--
> --nostringval--   2   %stopped_push   --nostringval--   2   3
> %oparray_pop   3   3   %oparray_pop   --nostringval--
> --nostringval--   --nostringval--   --nostringval--   --nostringval--
> false   1   %stopped_push   6   4   %oparray_pop   --nostringval--
> --nostringval--   --nostringval--   5   -1   1   --nostringval--
> %for_neg_int_continue   --nostringval--   --nostringval--
> Dictionary stack:
>    --dict:1054/1123(ro)(G)--   --dict:0/20(G)--   --dict:71/200(L)--
> --dict:17/17(ro)(G)--   --dict:1054/1123(ro)(G)--
> Current allocation mode is local
> Last OS error: 2
> Current file position is 2524
> AFPL Ghostscript 8.00: Unrecoverable error, exit code 1
> [war@war war]$
> 
> [war@war war]$ gs -h
> AFPL Ghostscript 8.00 (2002-11-21)
> Copyright (C) 2002 artofcode LLC, Benicia, CA.  All rights reserved.
> Usage: gs [switches] [file1.ps file2.ps ...]
> Most frequently used switches: (you can use # in place of =)
>  -dNOPAUSE           no pause after page   | -q       `quiet', fewer
> messages
>  -g<width>x<height>  page size in pixels   | -r<res>  pixels/inch resolution
>  -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
>  -sOutputFile=<file> select output file: - for stdout, |command for pipe,
>                                          embed %d or %ld for page #
> Input formats: PostScript PostScriptLevel1 PostScriptLevel2
> PostScriptLevel3 PDF
> Available devices:
>    x11 x11alpha x11cmyk x11gray2 x11gray4 x11mono bmpmono bmpgray bmpsep1
>    bmpsep8 bmp16 bmp256 bmp16m bmp32b deskjet djet500 laserjet ljetplus
>    ljet2p ljet3 ljet3d ljet4 ljet4d lj5mono lj5gray cdeskjet cdjcolor
>    cdjmono cdj550 pj pjxl pjxl300 uniprint ijs bj10e bj200 bjc600 bjc800
>    faxg3 faxg32d faxg4 pcxmono pcxgray pcx16 pcx256 pcx24b pcxcmyk pbm
>    pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw pkm pkmraw pksm
>    pksmraw tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack tiff12nc
>    tiff24nc psmono psgray psrgb bit bitrgb bitcmyk png16m pnggray pngmono
>    png256 png16 jpeg jpeggray pdfwrite pswrite epswrite pxlmono pxlcolor
>    bbox cljet5 cljet5c spotrgb spotcmyk devicen xcf nullpage
> Search path:
>    . : /app/ghostscript-8.00/share/ghostscript/8.00/lib :
>    /app/ghostscript-8.00/share/ghostscript/fonts
> Initialization files are compiled into the executable.
> For more information, see
> /app/ghostscript-8.00/share/ghostscript/8.00/doc/Use.h
> tm.
> Report bugs to bug-gs@ghostscript.com, using the form in Bug-form.htm.
> 
> System Hardware:
>     CPU Type: Pentium III
>    CPU Speed: 868.653 MHz
>         Disk: ST380021A
>          Ram: 1009 MB
>         Swap: 2000 MB
> 
> System Software:
> Distribution: Red Hat Linux release 7.3 (Valhalla)
>    audiofile: 0.2.3
>     autoconf: 2.57
>     automake: 1.7.2
>     binutils: 2.13.1
>    e2fsprogs: 1.27
>       esound: 0.2.29
>          gcc: 3.2.1
>      gettext: 0.11.5
>        glibc: 2.2.5
>         glib: 1.2.10
>   gnome-libs: 1.4.1.2
>          gtk: 1.2.10
>        imlib: 1.9.14
>       kernel: 2.4.20
>      libtool: 1.4.3
>         make: 3.80
>     modutils: 2.4.22
>      openssl: 0.9.6h
>        orbit: 0.5.13
>    orbit-idl: 0.6.8
>         perl: 5.8.0
>           qt: 3.1.0
>          rpm: 4.0.4
>          sdl: 1.2.5
>   util-linux: 2.11n
>      xfree86: 4.2.0
>         xml2: 2.4.30
>          xml: 1.8.17
> 
> _______________________________________________
> bug-gs mailing list
> bug-gs@ghostscript.com
> http://www.ghostscript.com/mailman/listinfo/bug-gs