1 % Copyright (C) 1996 Aladdin Enterprises. All rights reserved.
3 % This software is provided AS-IS with no warranty, either express or
6 % This software is distributed under license and may not be copied,
7 % modified or distributed except as expressly authorized under the terms
8 % of the license contained in the file LICENSE in this distribution.
10 % For more information about licensing, please refer to
11 % http://www.ghostscript.com/licensing/. For information on
12 % commercial licensing, go to http://www.artifex.com/licensing/ or
13 % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14 % San Rafael, CA 94903, U.S.A., +1(415)492-9861.
16 % $Id: gs_typ42.ps,v 1.7 2004/12/16 12:34:56 igor Exp $
17 % Type 42 font support code.
19 % Here are the BuildChar and BuildGlyph implementation for Type 42 fonts.
20 % The names %Type42BuildChar and %Type42BuildGlyph are known to the
21 % interpreter. The real work is done in an operator:
22 % <font> <code|name> <name> <glyphindex> .type42execchar -
24 (%Type42BuildChar) cvn % <font> <code> %Type42BuildChar -
25 { 1 index /Encoding get 1 index get .type42build
27 (%Type42BuildGlyph) cvn % <font> <name> %Type42BuildGlyph -
30 /.type42build % <font> <code|name> <name> .type42build -
32 dup CharStrings exch .knownget not
33 { 2 copy eq { exch pop /.notdef exch } if
35 { (Substituting .notdef for ) print
36 =string cvs print ( in the font ) print
37 1 index /FontName get = flush
41 /.notdef CharStrings /.notdef get
46 % Register the font type for definefont.
47 buildfontdict 42 /.buildfont42 cvx put