home *** CD-ROM | disk | FTP | other *** search
/ Mixa 155: Dogs / MIXA 155: Dogs.iso / pc / Viewer / BROWSER(W) / フィルタ / PDF / LIB / gs_ccfnt.ps < prev    next >
Encoding:
Text File  |  2002-10-29  |  1.7 KB  |  64 lines

  1. %    Copyright (C) 1994, 2000 Aladdin Enterprises.  All rights reserved.
  2. % This software is licensed to a single customer by Artifex Software Inc.
  3. % under the terms of a specific OEM agreement.
  4.  
  5. % $RCSfile: gs_ccfnt.ps,v $ $Revision: 1.8 $
  6. % Find and register all the precompiled font operators in systemdict.
  7.  
  8. /registerfont            % <fontname> <fontdict> registerfont <font>
  9.  { DEBUG { (Registering ) print 1 index = } if
  10.    dup begin
  11.      Encoding type /nametype eq
  12.       { Encoding .findencoding /Encoding exch def
  13.       }
  14.      if
  15.      dup /PrefEnc known
  16.       { PrefEnc type /nametype eq
  17.      { PrefEnc .findencoding /PrefEnc exch def
  18.      }
  19.     if
  20.       }
  21.      if
  22.      dup /FDepVector known
  23.       { /FDepVector [ FDepVector
  24.      { .FontDirectory 1 index .knownget
  25.         { exch pop }
  26.         { ccfonts 1 index .knownget
  27.            { registerfont
  28.            }
  29.            { Fontmap 1 index known
  30.           { findfont }
  31.           { pop NullFont }
  32.          ifelse
  33.            }
  34.           ifelse
  35.         }
  36.        ifelse
  37.      }
  38.     forall ] readonly def
  39.       }
  40.      if
  41.    end
  42.    % Use the value of definefont appropriate at run-time, not bind-time
  43.    /definefont load exec
  44.  } bind odef
  45. % Bind recursive call (bind descends into oparrays: feature!)
  46. /registerfont dup load bind def
  47.  
  48. /.loadinitialfonts {
  49.    //.loadinitialfonts exec
  50.    /ccfonts mark
  51.      0 1 null .getccfont 1 sub { .getccfont dup /FontName get exch } for
  52.    .dicttomark def
  53.         % Make sure these fonts are registered as "resources".
  54.    currentfile {
  55.      pop ccfonts
  56.       { .FontDirectory 2 index known { pop pop } { registerfont pop } ifelse }
  57.      forall
  58.   } .execasresource
  59.   currentdict /ccfonts .undef
  60. } bind def
  61.  
  62. currentdict /registerfont .undef
  63.