home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / clipart / gs22.zip / FCUTILS.PS < prev    next >
Text File  |  1990-05-06  |  2KB  |  47 lines

  1. %    Copyright (C) 1990 Aladdin Enterprises.  All rights reserved.
  2. %    Distributed by Free Software Foundation, Inc.
  3. %
  4. % This file is part of Ghostscript.
  5. %
  6. % Ghostscript is distributed in the hope that it will be useful, but
  7. % WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. % to anyone for the consequences of using it or for whether it serves any
  9. % particular purpose or works at all, unless he says so in writing.  Refer
  10. % to the Ghostscript General Public License for full details.
  11. %
  12. % Everyone is granted permission to copy, modify and redistribute
  13. % Ghostscript, but only under the conditions described in the Ghostscript
  14. % General Public License.  A copy of this license is supposed to have been
  15. % given to you along with Ghostscript so you can know your rights and
  16. % responsibilities.  It should be in a file named COPYING.  Among other
  17. % things, the copyright notice and this notice must be preserved on all
  18. % copies.
  19.  
  20. % fcutils.ps
  21. % Font conversion utilities for Ghostscript.
  22.  
  23. % Look up the output file name in the font map;
  24. %   close the map file.
  25. % <mapfile:file> <psfilename:string> fontmapfind ->
  26. %   <fontname:name> <encoding:name|null> <uniqueid:int>
  27. /fontmapfind
  28.  { /.psname exch def
  29.    /.mapfile exch def
  30.    { .mapfile token not        % font name
  31.       { (File name ) print .psname print
  32.         ( not found in mapping file.\n) print stop
  33.       } if
  34.      .mapfile token pop        % file name for comparison
  35.      .mapfile token pop        % encoding name or null
  36.      .mapfile token pop        % unique id
  37.      { .mapfile token pop /; cvx eq { exit } if } loop    % stuff up to ;
  38.      3 -1 roll .psname eq
  39.       { exit }
  40.       { pop pop pop }
  41.      ifelse
  42.    } loop
  43.    .mapfile closefile
  44.    (Mapping ) print .psname print ( to ) print 2 index =only
  45.    (\n) print flush
  46.  } bind def
  47.