home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / inne / gs300ini / gs_ccfnt.ps < prev    next >
Encoding:
Text File  |  1994-08-02  |  2.0 KB  |  69 lines

  1. %    Copyright (C) 1994 Aladdin Enterprises.  All rights reserved.
  2. % This file is part of Aladdin Ghostscript.
  3. % Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  4. % or distributor accepts any responsibility for the consequences of using it,
  5. % or for whether it serves any particular purpose or works at all, unless he
  6. % or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  7. % License (the "License") for full details.
  8. % Every copy of Aladdin Ghostscript must include a copy of the License,
  9. % normally in a plain ASCII text file named PUBLIC.  The License grants you
  10. % the right to copy, modify and redistribute Aladdin Ghostscript, but only
  11. % under certain conditions described in the License.  Among other things, the
  12. % License requires that the copyright notice and this notice be preserved on
  13. % all copies.
  14.  
  15. % Find and register all the precompiled font operators in systemdict.
  16.  
  17. /registerfont            % <fontname> <fontdict> registerfont <font>
  18.  { DEBUG { (Registering ) print 1 index = } if
  19.    dup begin
  20.      Encoding type /nametype eq
  21.       { Encoding .findencoding /Encoding exch def
  22.       }
  23.      if
  24.      dup /PrefEnc known
  25.       { PrefEnc type /nametype eq
  26.      { PrefEnc .findencoding /PrefEnc exch def
  27.      }
  28.     if
  29.       }
  30.      if
  31.      dup /FDepVector known
  32.       { /FDepVector [ FDepVector
  33.      { FontDirectory 1 index .knownget
  34.         { exch pop }
  35.         { ccfonts 1 index .knownget
  36.            { registerfont
  37.            }
  38.            { Fontmap 1 index known
  39.           { findfont }
  40.           { pop NullFont }
  41.          ifelse
  42.            }
  43.           ifelse
  44.         }
  45.        ifelse
  46.      }
  47.     forall ] readonly def
  48.       }
  49.      if
  50.    end definefont
  51.  } bind def
  52.  
  53.    /ccfonts mark systemdict
  54.     { exch =string cvs (.font_) anchorsearch
  55.        { pop pop exec dup /FontName get exch }
  56.        { pop pop }
  57.       ifelse
  58.     }
  59.    forall .dicttomark def
  60.    ccfonts
  61.     { FontDirectory 2 index known { pop pop } { registerfont pop } ifelse }
  62.    forall
  63.  
  64. currentdict /registerfont undef
  65. currentdict /ccfonts undef
  66.