home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 3
/
Merciful_Release_3.bin
/
software
/
f
/
finalwriter
/
finalwriterv5.03a.dms
/
finalwriterv5.03a.adf
/
FWFiles.lha
/
init.ps
< prev
next >
Wrap
Text File
|
1995-03-28
|
6KB
|
206 lines
%! Initialization file for postscript interpreter
% $Id: init.ps,v 1.1 1994/12/23 13:47:46 Woody Exp $
% $Date: 1994/12/23 13:47:46 $
% $Revision: 1.1 $
% $Revision Date: 92/12/19$
%
% Used By Final Writer to aid in interpreting EPS Files
%
% PostScript software version
/version (48.0) def
% Ignore CTRL/D
<04> cvn {} def
% A dummy status dictionary
/statusdict 10 dict dup begin
/waittimeout 0 def
/checkpassword { 0 eq } bind def
/product (Post V1.7) def
end def
% A dummy server dictionary
/serverdict 5 dict dup begin
/exitserver { pop } bind def
end def
% The internal dictionary
%/internaldict { pop null } dup 1 5 dict put def
%1183615869 internaldict begin
%/StemSnapLength 12 def
%end
% A scratch string
/=string 256 string def
% ISO Latin 1 encoding vector (omitting accents 90 - 9f)
systemdict
/ISOLatin1Encoding [
StandardEncoding 0 160 getinterval
/space/exclamdown/cent/sterling
/currency/yen/brokenbar/section
/dieresis/copyright/ordfeminine/guillemotleft
/logicalnot/hyphen/registered/macron
/degree/plusminus/twosuperior/threesuperior
/acute/mu/paragraph/periodcentered
/cedilla/onesuperior/ordmasculine/guillemotright
/onequarter/onehalf/threequarters/questiondown
/Agrave/Aacute/Acircumflex/Atilde
/Adieresis/Aring/AE/Ccedilla
/Egrave/Eacute/Ecircumflex/Edieresis
/Igrave/Iacute/Icircumflex/Idieresis
/Eth/Ntilde/Ograve/Oacute
/Ocircumflex/Otilde/Odieresis/multiply
/Oslash/Ugrave/Uacute/Ucircumflex
/Udieresis/Yacute/Thorn/germandbls
/agrave/aacute/acircumflex/atilde
/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis
/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute
/ocircumflex/otilde/odieresis/divide
/oslash/ugrave/uacute/ucircumflex
/udieresis/yacute/thorn/ydieresis
] put
% 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
% New cache parameters ops
systemdict
/setcacheparams
{ counttomark 1 ge { dup setcachelimit } if
cleartomark
} bind put
systemdict
/currentcacheparams
{ mark cachestatus 6 { exch pop} repeat dup
} bind put
% Load a font file. Build the file name string from the font name, prefix
% and suffix strings. We pop the dictionary stack first, so that the
% contents of any additional entries on it can't interfere with the font
% definition - e.g. if it uses the bind operator. Then we try to open the
% file. If it opens OK we execute it; if the open fails we return without
% error: presumabaly we don't have the font. Before returning we restore the
% dictionary stack.
systemdict
/loadfont
{ 1 index =string copy % Prefix:
length % length
3 index =string 2 index 100 getinterval cvs % Prefix:name
length add % length
1 index =string 2 index 100 getinterval copy % Prefix:name.suffix
length add % length
=string exch 0 exch getinterval % Truncate to length
mark countdictstack 2 sub
{ currentdict end } repeat % Pop dict stack
counttomark 1 add index % Get the file name
{ fontfile } stopped % Try to open the file
{ pop } % Can't open it, ignore
{ cvx exec } % Opened OK, execute it
ifelse
counttomark { begin } repeat pop % Restore dictionary stack
pop pop pop pop % Pop file name and arguments
} bind put
% Find a font. If it is not there we try in order:
%
% Load PSFonts:name
% Load PSFonts:OtherFonts/name
% Substitute DefaultFont
%
% If none of these succeeds, the result will an invalidfont error.
systemdict /.findfont systemdict /findfont get put
systemdict
/findfont
{
% Comment out the next 3 lines if you don't have a PSFonts: directory
% If you have a directory containing Type-1 fonts to use for EPS clip
% art, substitute the path name of the directory for "PSFonts:" below.
% dup FontDirectory exch known not % Not in FontDirectory?
% { dup (PSFonts:) () loadfont % Try to load from PSFonts:
% } if
% If you want to search more than one directory, duplicate the following
% few lines for each additional font directory path.
% dup FontDirectory exch known not % Not in FontDirectory?
% { dup (PSFonts:OtherFonts/) () loadfont % Try PSFonts:OtherFonts
% } if
% Substitute DefaultFont
dup FontDirectory exch known not % Not in FontDirectory?
{ dup userdict /DefaultFontName get ne % Not the DefaultFont
{ pop userdict /DefaultFontName get % Substitue DefaultFont
dup systemdict /findfont get exec pop % Recurse so it gets loaded
}
if
}
if
dup FontDirectory exch known not % Not in FontDirectory?
{ pop /DummyFont } if % Fall back on DummyFont
.findfont % If errors, will fail now
} bind put
% Select a font
systemdict
/selectfont
{ exch findfont exch
dup type /arraytype eq
{ makefont }
{ scalefont }
ifelse
setfont
} bind put
% Define a dummy font - prints out big dots ...
/DummyFont 10 dict dup begin
/FontName /DummyFont def
/FontMatrix [0.001 0 0 0.001 0 0] def
/FontType 3 def
/FontBBox [0 -300 500 700] def
/Encoding StandardEncoding def
/BuildChar
{ pop pop
500 0 50 0 450 400 setcachedevice
% 250 200 200 0 360 arc fill
} bind def
/Painttype 0 def
end definefont pop
% Establish the dummy font as the default, as some fonts need it to
% define themselves.
/DefaultFontName /DummyFont def
% Put a null function in place of showpage for those naughty
% people who put showpages in their EPS files (tsk, tsk...)
% without this the objects will come up blank on the screen
% because their "showpage" clears the bitmap.
systemdict /showpage {} put