home *** CD-ROM | disk | FTP | other *** search
- % Copyright (C) 1989 Aladdin Enterprises. All rights reserved.
- % Distributed by Free Software Foundation, Inc.
- %
- % This file is part of Ghostscript.
- %
- % Ghostscript is distributed in the hope that it will be useful, but
- % WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
- % to anyone for the consequences of using it or for whether it serves any
- % particular purpose or works at all, unless he says so in writing. Refer
- % to the Ghostscript General Public License for full details.
- %
- % Everyone is granted permission to copy, modify and redistribute
- % Ghostscript, but only under the conditions described in the Ghostscript
- % General Public License. A copy of this license is supposed to have been
- % given to you along with Ghostscript so you can know your rights and
- % responsibilities. It should be in a file named COPYING. Among other
- % things, the copyright notice and this notice must be preserved on all
- % copies.
-
- % Font initialization for GhostScript
- % This file is highly configuration-dependent.
-
- 9 dict dup begin
-
- /FontType 7 def % GhostScript font
- /FontMatrix [1 8 div 0 0 1 14 div 0 0] def
- /FontBBox [0 0 1 1] def
-
- /Encoding StandardEncoding readonly def
-
- /BuildChar
- { exch begin % fontdict
- 8 0 0 -3 8 11 setcachedevice
- Encoding exch get
- CharData exch get
- currentpoint translate 0 -3 translate
- newpath FontType addcharpath fill
- end
- } bind def
-
- % Read the data for the standard font.
- % The first two tokens are the width and height.
- % This is followed by pairs of <character code>, <bits or vectors>.
- % The vector format is compatible with the addcharpath operator.
-
- /CharData 128 dict def
- 3 dict begin
- (uglyfont.cp) (r) file /f exch def
- f token pop /w exch def
- f token pop /h exch def
- { f token not {exit} if
- StandardEncoding exch get CharData exch
- f token pop put
- } loop
- % Make undefined characters display as blank
- CharData /.notdef CharData StandardEncoding 32 get get put
- end
-
- /UniqueID 5 def
-
- end
-
- /TheFont exch definefont pop
-
- % Redefine findfont so it always finds the standard font
-
- /.findfont /findfont load def
- /findfont {pop /TheFont .findfont} def
-
- % Define the PostScript standard fonts as copies of the bit font.
- % This is a no-op for now, since we have redefined findfont.
-
- %%% {/Helvetica /Helvetica-Bold /Times-Roman /Times-Bold /Courier /Symbol}
- %%% { 9 dict
- %%% /TheFont findfont
- %%% { exch dup /FID ne
- %%% { exch 2 index 4 1 roll put }
- %%% { pop pop }
- %%% ifelse
- %%% } forall
- %%% definefont pop
- %%% } forall
-
- % Initialize with a default font
- /Courier findfont 10 scalefont setfont
-
- % Simulate charpath
- /charpath
- { pop
- matrix currentmatrix exch % gsave won't work
- currentfont begin
- FontMatrix concat
- currentpoint translate 0 -3 translate
- { Encoding exch get
- CharData exch get
- FontType addcharpath
- 8 0 translate
- } forall
- end
- setmatrix
- } bind def
-
- %%%%%%
- DEBUG {vmstatus pop = pop flush} if
- %%%%%%
-