From: eduardo@m2xenix.psg.com (Eduardo Salom)
Subject: Please, I need a help with this script!
Organization: Pacific Systems Group, Portland Oregon US
Date: Mon, 17 Aug 1992 21:34:29 GMT

I have an HP LJII and recently I bought the Adobe PostScript Cartridge and
the Adobe Type Cartridge 1, now I need to enable the accented and tilded
characters used in Spanish. I know almost nothing of PS but from a book I
bought I copied a program which is supossed to do that but I can't print
nothing, not even a blank page. There is some PS wizard around kind enough
to tell me what's wrong with it?

%!
userdict /CaractDict known { stop } if
serverdict begin 0 exitserver

/CaractDict 100 dict def
CaractDict begin

/DictLocal 12 dict def
/Reencode
{ DictLocal begin
  /NuevoVect exch def
  /NombreNuevoJuego exch def
  /NombreJuegoBase exch def
  /JuegoBaseDict NombreJuegoBase findfont def
  /NuevoDict JuegoBaseDict maxlength dict def

  JuegoBaseDict
  { exch dup /FID ne
    { dup /Encoding eq
      { exch dup length array copy NuevoDict 3 1 roll put }
      { exch NuevoDict 3 2 roll put }
    ifelse }
      { pop pop }
  ifelse }
  forall

  NuevoDict /FontName NombreNuevoJuego put

  NuevoVect aload pop
  NuevoVect length 2 idiv
  { NuevoDict /Encoding get 3 1 roll put } repeat
  NombreNuevoJuego NuevoDict definefont pop
  end
} def

/FrancVect
[
130 /Ccedilla
131 /Eaguda
133 /Odieresis
136 /agrave
137 /acircunflejo
138 /adieresis
141 /ccedilla
142 /eaguda
143 /egrave
144 /ecircunflejo
145 /edieresis
148 /icircunflejo
149 /idieresis
153 /ocircunflejo
154 /odieresis
157 /ugrave
158 /ocircunflejo
159 /udieresis
229 /Acircunflejo
230 /Ecircunflejo
231 /Agrave
232 /Edieresis
233 /Egrave
235 /Icircunflejo
236 /Idieresis
239 /Ocircunflejo
243 /Ucircunflejo
] def

/Times-Roman /Times-Roman-Frances FrancVect Reencode

%Test

/Times-Roman-Frances findfont
20 scalefont setfont
100 100 moveto
(..........................) show  <-- Here the 8-bit charset
end
showpage


My word processor uses this prolog (it works right), I tried sending it to
the printer before the previous stuff without any difference.

%!PS-Adobe-1.0
%%Pages: (atend)
%%EndComments

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% User modifiable variables

	/DefaultPageTop 792 def	% height of page in points -- change
				% this if you use legal or other size paper

	/weight 1 def	% variable to control amount of letter
			% vs. word spacing.  Increase this
			% value (i.e. 100) to use less letter spacing and
			% more word spacing.  Decrease this
			% value (i.e. .01) to shift emphasis to letter
			% spacing

% Also, here you can define a routine "cleanup" that will be called
% at the end of printing the document.

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/endpage where not
	{ /endpage { restore } bind def } { pop } ifelse
/cleanup where not
	{ /cleanup { } def } { pop } ifelse
/addpts 0 def		% points to add to characters
/addsppts 0 def		% additional points to add to spaces
/lwidth 0 def		% width of printed area of line
/offset 0 def		% point to begin text
/pts 24 def		% height of the font kept here
/cr {			% carriage return, move to point 0 x
    currentpoint exch pop 0 exch moveto
    /swid 0 def		% width of shown strings in the line
    /nchars 0 def	% count of characters in the line
} bind def
/ldown {		% stack: number of lines to move down
    dup 1 gt		% lsize is height of the line
    {
	1 exch 1 exch { pop 1 ldown } for
    }
    {
	pop currentpoint exch pop lsize gt
	{
	    0 lsize neg rmoveto
	}
	{
	    showpage 0 pagetop moveto
	} ifelse
    } ifelse
} bind def
/lw {		% tally width and count of this line segment (on stack)
    dup stringwidth pop /swid exch swid add def
    dup length /nchars exch nchars add def
} bind def
/uson {			% underscore on routine, stack: points down to move
    offset 0 rmoveto /offset 0 def
    currentpoint
    3 -1 roll
    add
    /usy exch def
    /usx exch def
} bind def
/usoff {		% underscore off routine -- draw the line
    currentpoint pop usx eq
    {
	pop
    }
    {
	gsave
	currentpoint
	3 -1 roll
	add
	moveto
	usx usy lineto
	stroke
	grestore
    } ifelse
} bind def
/soon {			% strikeout on routine, stack: size of font
	offset 0 rmoveto /offset 0 def
	currentpoint
	3 -1 roll
	3 div
	add
	/soy exch def
	/sox exch def
} bind def
/sooff {		% strikeout off -- draw the line
    currentpoint pop sox eq
    {
	pop
    }
    {
	gsave
	currentpoint
	3 -1 roll
	3 div
	add
	moveto
	sox soy lineto
	stroke
	grestore
    } ifelse
} bind def
/qj			% Justify quadding routine
{			% stack: number of blanks
    /nblanks exch def
    /whitespace lwidth swid sub def
    /offset 0 def
    nblanks 0 eq nchars 1 gt and
    {
	/addsppts 0 def
	/addpts whitespace nchars 1 sub div def
    }
    {
	nchars 0 eq nchars 1 le or
	{
	    /addpts 0 def
	    /addsppts 0 def
	}
	{
	    whitespace nblanks div weight pts mul ge
	    {
		/addsppts weight pts mul def
		/addpts whitespace addsppts nblanks mul sub nchars 1 sub div def
	    }
	    {
		/addpts 0 def
		/addsppts whitespace nblanks div def
	    } ifelse
	} ifelse
    } ifelse
} bind def
/qc {			% quad center
    pop			% stack: number of blanks, don't need
    /addsppts 0 def
    /addpts 0 def
    /offset lwidth swid sub 2 div def
} bind def
/qlj {			% quad left justify
    pop			% stack: number of blanks
    /addsppts 0 def
    /addpts 0 def
    /offset 0 def
} bind def
/qrj {			% quad right justify
    pop
    /addsppts 0 def
    /addpts 0 def
    /offset lwidth swid sub def
} bind def
/ws {			% show the line segment
    offset 0 rmoveto /offset 0 def
    addsppts 0 32 addpts 0 6 -1 roll awidthshow
} bind def

%%EndProlog

-- 
 Eduardo J. Salom    | eduardo@psg.com      ..!uunet!m2xenix!eduardo
 Larrea 1218 - 2.A   | BIX: swp     CIS: [73000,74]     DELPHI: swp
 (1117) Buenos Aires | FidoNet: Eduardo_Salom@4:900/112.7
 Argentina           | VMS-Mail: PSI%0311061703053::SWP