This isn't necessarily a bug, but is behavior that we don't understand. In gs_res.ps there is this code: % Make sure the old definitions are still in systemdict so that % they will get bound properly. systemdict begin /.origdefinefont /definefont load def /.origundefinefont /undefinefont load def /.origfindfont /findfont load def end .origdefinefont, .origundefinefont and .origfindfont are not referenced anywhere else, but this code cannot be deleted without causing problems. It works okay to undef these 3 procedures in gs_init.ps, after all the initialization is complete, but never defining them at all doesn't work for some reason. Some of the problems occur in these samples: this will segfault: debugbin/gs -IResource/Init -Z: -sDEFAULTPAPERSIZE=letter -dBATCH -dClusterJob -dJOBSERVER -sDEVICE=ppmraw -dMaxBitmap=4000m -r300 -o out.bin /home/nad/work/samples/tests_private/comparefiles/Bug692361.pdf Loading NimbusSans-Regular font from Resource/Font/NimbusSans-Regular... Can't find font with non-string name: false. Can't find (or can't open) font file Resource/Font/false. Can't find font with non-string name: false. Querying operating system for font files... Can't find (or can't open) font file Resource/Font/false. Can't find font with non-string name: false. Didn't find this font on the system! Substituting font Courier for false. Loading NimbusMonoPS-Regular font from Resource/Font/NimbusMonoPS-Regular... Can't find font with non-string name: false. Can't find (or can't open) font file Resource/Font/false. Can't find font with non-string name: false. Didn't find this font on the system! Unable to substitute for font. Error: /invalidfont in /findfont Operand stack: Helvetica Helvetica Helvetica Execution stack: %interp_exit .runexec2 --nostringval-- .findfontop --nostringval-- 2 %stopped_push --nostringval-- .findfontop .findfontop false 1 %stopped_push 1960 1 3 %oparray_pop 1959 1 3 %oparray_pop 1958 1 3 %oparray_pop .findfontop 1947 1 3 %oparray_pop 1803 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- .findfontop --nostringval-- 2 %stopped_push --nostringval-- .findfontop 1896 3 4 %oparray_pop Dictionary stack: --dict:826/1123(ro)(G)-- --dict:0/20(G)-- --dict:88/200(L)-- --dict:2/53(L)-- (SEGFAULT) Other samples with issues: tests/Ghent_V5.0/GWG091_FontSupport-OpenType_X4.pdf tests/eps/executable-fontbbox.eps
Just a note that adding a bind to the definition of /definefont in gs_fonts.ps allows the: /.origdefinefont /definefont load def line to be removed. I assume that doing the same for /undefinefont and /findfont would work similarly. This *may* be the solution, but we'd all like to understand a bit better what's going on before accepting that.
Bumping over to Chris for handling -- seems like he's already had a look into it, and fonts are in his area of expertise. Of course, closing as WONTFIX seems reasonable since other than a point of confusion it doesn't seem to cause any harm (or expose any dangerous operators).
Fixed in: https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=a9e0b6839b44