home *** CD-ROM | disk | FTP | other *** search
/ jppd.dyndns.org / jppd.dyndns.org.tar / jppd.dyndns.org / QUERYPRO / Impressora_PDF / converter.exe / GPLGS / gs_ccfnt.ps < prev    next >
Text File  |  2003-04-13  |  2KB  |  76 lines

  1. %    Copyright (C) 1994, 2000 Aladdin Enterprises.  All rights reserved.
  2. % This software is provided AS-IS with no warranty, either express or
  3. % implied.
  4. % This software is distributed under license and may not be copied,
  5. % modified or distributed except as expressly authorized under the terms
  6. % of the license contained in the file LICENSE in this distribution.
  7. % For more information about licensing, please refer to
  8. % http://www.ghostscript.com/licensing/. For information on
  9. % commercial licensing, go to http://www.artifex.com/licensing/ or
  10. % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  11. % San Rafael, CA  94903, U.S.A., +1(415)492-9861.
  12.  
  13. % $Id: gs_ccfnt.ps,v 1.8 2003/04/12 18:08:18 ray Exp $
  14. % Find and register all the precompiled font operators in systemdict.
  15.  
  16. /registerfont            % <fontname> <fontdict> registerfont <font>
  17.  { CCFONTDEBUG { (Registering ) print 1 index = } if
  18.    dup begin
  19.      Encoding type /nametype eq
  20.       { Encoding .findencoding /Encoding exch def
  21.       }
  22.      if
  23.      dup /PrefEnc known
  24.       { PrefEnc type /nametype eq
  25.      { PrefEnc .findencoding /PrefEnc exch def
  26.      }
  27.     if
  28.       }
  29.      if
  30.      dup /FDepVector known
  31.       { /FDepVector [ FDepVector
  32.      { .FontDirectory 1 index .knownget
  33.         { exch pop }
  34.         { ccfonts 1 index .knownget
  35.            { registerfont
  36.            }
  37.            { Fontmap 1 index known
  38.           { findfont }
  39.           { pop NullFont }
  40.          ifelse
  41.            }
  42.           ifelse
  43.         }
  44.        ifelse
  45.      }
  46.     forall ] readonly def
  47.       }
  48.      if
  49.    end
  50.    % Use the value of definefont appropriate at run-time, not bind-time
  51.    /definefont load exec
  52.  } bind odef
  53. % Bind recursive call (bind descends into oparrays: feature!)
  54. /registerfont dup load bind def
  55.  
  56. /.loadinitialfonts {
  57.   //.loadinitialfonts exec
  58.   NOCCFONTS not {
  59.     /ccfonts mark
  60.       0 1 null .getccfont 1 sub { .getccfont dup /FontName get exch } for
  61.     .dicttomark def
  62.         % Make sure these fonts are registered as "resources".
  63.     currentfile {
  64.       pop ccfonts {
  65.     .FontDirectory 2 index known { pop pop } { registerfont pop } ifelse
  66.       } forall
  67.     } .execasresource
  68.     currentdict /ccfonts .undef
  69.   } if
  70. } bind def
  71.  
  72. currentdict /registerfont .undef
  73.