🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1905

Testing a printer for a downloadable font...

#1905
From: John Warburton
Date: Wed, 09 Sep 1992 07:08
58 lines
1677 bytes
Hello all,

I have a little bit of code which checks to see if
a downloadable font is on the printer:

%!PS
FontDirectory /Barcode known {
  /Times-Italic findfont 30 scalefont setfont
  newpath 0 setgray 200 400 moveto (found Barcode) show
}
{ %else
  /Times-Italic findfont 30 scalefont setfont
  newpath 0 setgray 200 400 moveto (Barcode not downloaded) show
} ifelse

This works well.

What I would like to do would actually put the code for the font
into the else block. ie jam the download code in to look like:
 
{ %else
  serverdict begin 0 exitserver
% FONT DICTIONARY
% ScaleFactor 1.117318
%--------- Define Dictionary
12 dict dup begin
%--------- FontMatrix
 /FontMatrix [0.001000 0 0 0.001000 0 0] def
%--------- FontType
 /FontType 3 def
%--------- FontBBox
 /FontBBox [0 -23 750 978] def
%--------- FontInfo
 /FontInfo 9 dict dup begin
.
.
.
.
/UniqueID 66 def

/Barcode exch definefont pop
statusdict begin [ 210 30 13 0 1 setidlefonts end

} ifelse

showpage

This unfortunately fails with a stack overflow.
Can anyone suggest any reason why?

Thanks

John
-- 
John Warburton				Internet:    johnw@bnd2.bnd.oz.au
Systems Administrator			Phone:       +61 2 771 5566
B & D Australia				Fax:	     +61 2 771 6385
		  Living on ice-cream and chocolate kisses...
Technical Details
Message-ID: <1992Sep9.070848.16580@bnd2.bnd.oz.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!bnd2.bnd.oz.au!johnw

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!bnd2.bnd.oz.au!johnw
From: johnw@bnd2.bnd.oz.au (John Warburton)
Subject: Testing a printer for a downloadable font...
Message-ID: <1992Sep9.070848.16580@bnd2.bnd.oz.au>
Organization: B&D Doors, Sydney, NSW, Australia
Date: Wed, 9 Sep 1992 07:08:48 GMT
Lines: 58