1 /* Copyright (C) 1994, 2000 Aladdin Enterprises. All rights reserved. 2 3 This software is provided AS-IS with no warranty, either express or 4 implied. 5 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. 9 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. 15 */ 16 17 /* $Id: gxfont0.h,v 1.6 2002/06/24 17:27:30 lpd Exp $ */ 18 /* Type 0 (composite) font data definition */ 19 20 #ifndef gxfont0_INCLUDED 21 # define gxfont0_INCLUDED 22 23 /* Define the composite font mapping types. */ 24 /* These numbers must be the same as the values of FMapType */ 25 /* in type 0 font dictionaries. */ 26 typedef enum { 27 fmap_8_8 = 2, 28 fmap_escape = 3, 29 fmap_1_7 = 4, 30 fmap_9_7 = 5, 31 fmap_SubsVector = 6, 32 fmap_double_escape = 7, 33 fmap_shift = 8, 34 fmap_CMap = 9 35 } fmap_type; 36 37 #define fmap_type_min 2 38 #define fmap_type_max 9 39 #define fmap_type_is_modal(fmt)\ 40 ((fmt) == fmap_escape || (fmt) == fmap_double_escape || (fmt) == fmap_shift) 41 42 /* This is the type-specific information for a type 0 (composite) gs_font. */ 43 #ifndef gs_cmap_DEFINED 44 # define gs_cmap_DEFINED 45 typedef struct gs_cmap_s gs_cmap_t; 46 #endif 47 typedef struct gs_type0_data_s { 48 fmap_type FMapType; 49 byte EscChar, ShiftIn, ShiftOut; 50 gs_const_string SubsVector; /* fmap_SubsVector only */ 51 uint subs_size; /* bytes per entry */ 52 uint subs_width; /* # of entries */ 53 uint *Encoding; 54 uint encoding_size; 55 gs_font **FDepVector; 56 uint fdep_size; 57 const gs_cmap_t *CMap; /* fmap_CMap only */ 58 } gs_type0_data; 59 60 #define gs_type0_data_max_ptrs 3 61 62 #ifndef gs_font_type0_DEFINED 63 # define gs_font_type0_DEFINED 64 typedef struct gs_font_type0_s gs_font_type0; 65 #endif 66 67 struct gs_font_type0_s { 68 gs_font_common; 69 gs_type0_data data; 70 }; 71 72 extern_st(st_gs_font_type0); 73 #define public_st_gs_font_type0() /* in gsfont0.c */\ 74 gs_public_st_complex_only(st_gs_font_type0, gs_font_type0, "gs_font_type0",\ 75 0, font_type0_enum_ptrs, font_type0_reloc_ptrs, gs_font_finalize) 76 77 /* Define the Type 0 font procedures. */ 78 font_proc_define_font(gs_type0_define_font); 79 font_proc_make_font(gs_type0_make_font); 80 font_proc_init_fstack(gs_type0_init_fstack); 81 font_proc_next_char_glyph(gs_type0_next_char_glyph); 82 83 #endif /* gxfont0_INCLUDED */ 84