home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
printer
/
post.zip
/
init.ps
< prev
next >
Wrap
Text File
|
1990-03-04
|
2KB
|
75 lines
%! Post V1.0 initialisation file
% This file should be run before most programs
% Ignore CTRL/D
<04> cvn {} def
% A dummy status dictionary
/statusdict 10 dict dup begin
/waittimeout 0 def
end def
% A scratch string
/=string 256 string def
% Run a program with save and restore
/runsave
{ /saveobject save def
run
saveobject restore
} bind def
% Run a program displaying its name
/runprog
{ dup print (\n) print
runsave
} bind def
% Find a font. If it is not there we attempt to download it from the
% "PSFonts:" directory; if that fails we substitute DefaultFont if it has
% been defined
/findfont
{ dup FontDirectory exch known not % Not in FontDirectory?
{ mark countdictstack 2 sub
{ currentdict end } repeat % Pop dict stack
counttomark 1 add index % Get the font name
{ (PSFonts:) =string copy pop % PSFonts:
=string 8 248 getinterval cvs length 8 add % PSFonts:name
=string exch 0 exch getinterval % Truncate to length
run % Load the font
} stopped { pop } if % Ignore errors for now
counttomark { begin } repeat pop % Restore dictionary stack
} if
dup FontDirectory exch known not % Still not there?
{ FontDirectory /DefaultFont known % DefaultFont defined?
{ pop /DefaultFont } if % Substitute DefaultFont
} if
systemdict /findfont get exec % If errors, will fail
} bind def
% Define a dummy font
/DummyFont 10 dict dup begin
/FontName /DummyFont def
/FontMatrix [0.001 0 0 0.0001 0 0] def
/FontType 3 def
/FontBBox [0 0 0 0] def
/Encoding StandardEncoding def
/BuildChar { pop pop 0 0 0 0 0 0 setcachedevice } def
/Painttype 0 def
end definefont pop
% Define a default font
FontDirectory /DefaultFont /DummyFont findfont put
%FontDirectory /DefaultFont /Courier findfont put
%FontDirectory /DefaultFont /Times-Roman findfont put