[comp.lang.postscript] NEC 890 font problem

woody@chinacat.Lonestar.ORG (Woody Baker @ Eagle Signal) (03/17/90)

After coming back from a long weekend vacation, attending a flint knappers
convention (studying the art of making stone tools), I have read the news 
and found Glenns bit of code and the test run of it.  Since this problem
came up over a year and a half ago, I decided to go get a copy of one of
the fonts, delete all but 1 character and post it.  I may be dead wrong about
the input scanner, but regardless, the readstring operator does not find
the (%%%) and thus hangs forever on the second font download in a NEC 890.
The symptom is that you can download 1 font.  downloading another font
causes the machine to hang looking for the %%%.  This failure causes it to
stay in the procesing state indefintly.  The QMS-ps810 does not exhibit the
problem, and presumably other machines don't either.  C & G had tested it
exclusively on Apples, and had no problems.  I came up with a crude, simple
workaround that fixed the problem. We downloaded for Pagemaker on the fly,
i.e. non-persistant fonts, and I changed the dictionary name Casa1 to
Casa(n)  where (n) was some arbitrary number.  It worked.  It is not 
optimal. You should be able to copy this to a NEC-890 (using whatever)
and the second time you copy it, it should hang the machine.

Cheers
Woody

%!PS-Adobe-2.0
%%Title: Fontographer 2.4.1
%%FontName: GalileoRoman
%%CreationDate: 1/9/89 7:52:05 PM  
%%Creator: RICHARD WARE
%%Pages: 0
%% Galileo*Roman, Version 3.1a, Copyright ) 1987-1988 by Richard A. Ware.  All Rights Reserved.
%%EndComments
%serverdict begin 0 exitserver % remove first percent sign for PC fonts...
systemdict
/currentpacking known
	{
	/SavPak currentpacking def true setpacking
	}if
userdict
	/Casa1 known		% if the preamble was known
		{
			{
			currentfile(   )readstring
				{
				(%%%)eq		%look for separator
					{
					exit
					}if
				}
				{
				pop		%hangs, looking forever
				}ifelse
			}loop
		}if
userdict begin/Casa1 39 dict def Casa1 begin/NL 0 def/B{bind def}bind def
/Cache{NL 0 eq{setcachedevice}{6{pop}repeat}ifelse 0 0 moveto}B
/SetWid{NL 0 eq{0 setcharwidth setgray}{pop setgray}ifelse 0 0 moveto}B
/ShowInt{/NL NL 1 add store BC2 grestore/NL NL 1 sub store}B
/charStr(.)def/Strk 0 def/Sstrk{/Strk 1 store}B
/Cfill{PaintType 0 eq{Strk 0 eq{exec}{gsave exec grestore
currentgray 0 ne{0 setgray}if stroke}ifelse}{pop stroke}ifelse}B
/Fill{{fill}Cfill}def/Eofill{{eofill}Cfill}def/Cp{closepath 0 0 moveto}def
/ShowExt{EFN exch get findfont setfont matrix currentmatrix exch
InvMtx concat 0 0 moveto charStr 0 3 -1 roll put PaintType 0 ne Strk 0 ne
or currentgray 0 ne or{charStr false charpath setmatrix Fill}
{charStr show pop}ifelse grestore}B/stringtype{{UCS}forall}B
/arraytype/exec load def/packedarraytype/exec load def
/BuildChar{Casa1 begin exch begin BC2 end end}B
/BC2{save 1 setflat exch StrokeWidth setlinewidth/Strk 0 store
Encoding exch get dup CharStrings exch known not{pop/.notdef}if
CharStrings exch get newpath dup type exec restore}B 
/UVec[{rmoveto}{rlineto}{rcurveto}{ShowExt}{]concat}{Cache}{setlinewidth}
{ShowInt}{setlinecap}{setlinejoin}{gsave}{[}{Fill}{Eofill}{stroke}{SetWid}
{100 mul add}{100 mul}{100 div}{Cp}{Sstrk}{setgray}]def
/UCS{dup 200 lt{100 sub}{dup 233 lt{216 sub 100 mul add}
{233 sub UVec exch get exec}ifelse}ifelse}B
/CD{/NF exch def{exch dup/FID ne{exch NF 3 1 roll put}  
{pop pop}ifelse}forall NF}B
/MN{1 index length/Len exch def dup length Len add string dup 
Len 4 -1 roll putinterval dup 0 4 -1 roll putinterval}B
/RC{(|______)anchorsearch {1 index MN cvn/NewN exch def cvn
findfont dup maxlength dict CD dup/FontName NewN put dup
/Encoding MacVec put NewN exch definefont pop}{pop}ifelse}B
/RF{dup cvn FontDirectory exch known{pop}{RC}ifelse}B
/MacVec 256 array def MacVec 0 /Helvetica findfont
/Encoding get 0 128 getinterval putinterval MacVec 127 /DEL put
MacVec 16#27 /quotesingle put  MacVec 16#60 /grave put/NUL/SOH/STX/ETX
/EOT/ENQ/ACK/BEL/BS/HT/LF/VT/FF/CR/SO/SI/DLE/DC1/DC2/DC3/DC4/NAK/SYN
/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US MacVec 0 32 getinterval astore pop
/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis/aacute
/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute/egrave
/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute
/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex/udieresis
/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls
/registered/copyright/trademark/acute/dieresis/notequal/AE/Oslash
/infinity/plusminus/lessequal/greaterequal/yen/mu/partialdiff/summation
/product/pi/integral/ordfeminine/ordmasculine/Omega/ae/oslash 
/questiondown/exclamdown/logicalnot/radical/florin/approxequal/Delta/guillemotleft
/guillemotright/ellipsis/nbspace/Agrave/Atilde/Otilde/OE/oe
/endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide/lozenge
/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi/fl
/daggerdbl/periodcentered/quotesinglbase/quotedblbase
/perthousand/Acircumflex/Ecircumflex/Aacute
/Edieresis/Egrave/Iacute/Icircumflex/Idieresis/Igrave/Oacute/Ocircumflex
/apple/Ograve/Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde
/macron/breve/dotaccent/ring/cedilla/hungarumlaut/ogonek/caron
MacVec 128 128 getinterval astore pop end end
%%%%%%
%%EndProlog
/$GalileoRoman 19 dict def $GalileoRoman begin/PaintType 0 def/FontType 3 def
/StrokeWidth 0 def/FontBBox[-52 -251 1006 832]def %/UniqueID 4835107 def
/FontMatrix[0.001000 0 0 0.001000 0 0]def/InvMtx[1000 0 0 1000 0 0]def
/CharStrings 257 dict def/FontName (GalileoRoman) def
/BuildChar{Casa1/BuildChar get exec}def
/FontInfo 3 dict def FontInfo begin
/UnderlinePosition -166 def/UnderlineThickness 19 def end
/Encoding Casa1/MacVec get def CharStrings begin/.notdef{500 0 setcharwidth} def
/NUL<646486D97CDA88D97EDAEE87D97DDAE9F5>def 
/HT<6464AE6DDBB06FDBEEAF6EDBE9F5>def 
/CR<6464AE95DAB097DAEEAF96DAE9F5>def 
/space<AADA6490D9A9D992D9ABD9EE91D9AAD9E9F5>def 
/exclam<96DA649D4064DA7FDFEEBCA8DEE97684A484B664EB704E73387221EB62453236
D43236D4EB5A64EA64643473DC3292DCEB637A659172A7EBFC81D9C2E9266426066605EB
A563A4C262C3EBFCF5>def 
end/EFN[]def
end systemdict/currentpacking known{SavPak setpacking}if
/GalileoRoman $GalileoRoman definefont pop
/GalileoRoman findfont/EFN get Casa1 begin{RF}forall end