home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Updates / GhostScript / !GhostScr / 6_01 / lib / gs_typ42.ps < prev    next >
Text File  |  2000-03-09  |  2KB  |  47 lines

  1. %    Copyright (C) 1996 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. % $Id: gs_typ42.ps,v 1.1 2000/03/09 08:40:40 lpd Exp $
  16. % Type 42 font support code.
  17.  
  18. % Here are the BuildChar and BuildGlyph implementation for Type 42 fonts.
  19. % The names %Type42BuildChar and %Type42BuildGlyph are known to the
  20. % interpreter.  The real work is done in an operator:
  21. %    <font> <code|name> <name> <glyphindex> .type42execchar -
  22.  
  23. (%Type42BuildChar) cvn    % <font> <code> %Type42BuildChar -
  24.  { 1 index /Encoding get 1 index get .type42build
  25.  } bind def
  26. (%Type42BuildGlyph) cvn    % <font> <name> %Type42BuildGlyph -
  27.  { dup .type42build
  28.  } bind def
  29. /.type42build        % <font> <code|name> <name> .type42build -
  30.  { 2 index begin
  31.     dup CharStrings exch .knownget not
  32.      { 2 copy eq { exch pop /.notdef exch } if
  33.        QUIET not
  34.     { (Substituting .notdef for ) print = flush }
  35.     { pop }
  36.        ifelse
  37.        /.notdef CharStrings /.notdef get
  38.      } if
  39.    end .type42execchar
  40.  } bind def
  41.  
  42. % Register the font type for definefont.
  43. buildfontdict 42 /.buildfont42 cvx put
  44.