1 /* Copyright (C) 1998, 1999 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: ifont1.h,v 1.7 2004/08/04 19:36:12 stefan Exp $ */ 18 /* Type 1 font utilities shared with Type 2 */ 19 20 #ifndef ifont1_INCLUDED 21 # define ifont1_INCLUDED 22 23 /* 24 * Define the temporary structure for holding pointers to substructures of a 25 * CharString-based font. This is used for parsing Type 1, 2, and 4 fonts. 26 */ 27 typedef struct charstring_font_refs_s { 28 ref *Private; 29 ref no_subrs; 30 ref *OtherSubrs; 31 ref *Subrs; 32 ref *GlobalSubrs; 33 } charstring_font_refs_t; 34 35 /* Define the default lenIV value for a Type 1 font. */ 36 #define DEFAULT_LENIV_1 4 37 38 /* 39 * Parse the substructures of a CharString-based font. 40 */ 41 int charstring_font_get_refs(const_os_ptr op, charstring_font_refs_t *pfr); 42 43 /* 44 * Get the parameters of a CharString-based font or a FDArray entry for a 45 * CIDFontType 0 font. The client has filled in pdata1->interpret, 46 * subroutineNumberBias, lenIV, and (if applicable) the Type 2 elements. 47 */ 48 int charstring_font_params(const gs_memory_t *mem, 49 const_os_ptr op, charstring_font_refs_t *pfr, 50 gs_type1_data *pdata1); 51 52 /* 53 * Fill in a newly built CharString-based font or FDArray entry. 54 */ 55 int charstring_font_init(gs_font_type1 *pfont, 56 const charstring_font_refs_t *pfr, 57 const gs_type1_data *pdata1); 58 59 /* 60 * Finish building a CharString-based font. The client has filled in the 61 * same elements as for charstring_font_params. 62 */ 63 int build_charstring_font(i_ctx_t *i_ctx_p, os_ptr op, 64 build_proc_refs * pbuild, font_type ftype, 65 charstring_font_refs_t *pfr, 66 gs_type1_data *pdata1, 67 build_font_options_t options); 68 69 #endif /* ifont1_INCLUDED */ 70