1 /* Copyright (C) 2001-2006 Artifex Software, Inc. 2 All Rights Reserved. 3 4 This software is provided AS-IS with no warranty, either express or 5 implied. 6 7 This software is distributed under license and may not be copied, modified 8 or distributed except as expressly authorized under the terms of that 9 license. Refer to licensing information at http://www.artifex.com/ 10 or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, 11 San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. 12 */ 13 14 /* $Id: ifont1.h 9043 2008-08-28 22:48:19Z giles $ */ 15 /* Type 1 font utilities shared with Type 2 */ 16 17 #ifndef ifont1_INCLUDED 18 # define ifont1_INCLUDED 19 20 /* 21 * Define the temporary structure for holding pointers to substructures of a 22 * CharString-based font. This is used for parsing Type 1, 2, and 4 fonts. 23 */ 24 typedef struct charstring_font_refs_s { 25 ref *Private; 26 ref no_subrs; 27 ref *OtherSubrs; 28 ref *Subrs; 29 ref *GlobalSubrs; 30 } charstring_font_refs_t; 31 32 /* Define the default lenIV value for a Type 1 font. */ 33 #define DEFAULT_LENIV_1 4 34 35 /* 36 * Parse the substructures of a CharString-based font. 37 */ 38 int charstring_font_get_refs(const_os_ptr op, charstring_font_refs_t *pfr); 39 40 /* 41 * Get the parameters of a CharString-based font or a FDArray entry for a 42 * CIDFontType 0 font. The client has filled in pdata1->interpret, 43 * subroutineNumberBias, lenIV, and (if applicable) the Type 2 elements. 44 */ 45 int charstring_font_params(const gs_memory_t *mem, 46 const_os_ptr op, charstring_font_refs_t *pfr, 47 gs_type1_data *pdata1); 48 49 /* 50 * Fill in a newly built CharString-based font or FDArray entry. 51 */ 52 int charstring_font_init(gs_font_type1 *pfont, 53 const charstring_font_refs_t *pfr, 54 const gs_type1_data *pdata1); 55 56 /* 57 * Finish building a CharString-based font. The client has filled in the 58 * same elements as for charstring_font_params. 59 */ 60 int build_charstring_font(i_ctx_t *i_ctx_p, os_ptr op, 61 build_proc_refs * pbuild, font_type ftype, 62 charstring_font_refs_t *pfr, 63 gs_type1_data *pdata1, 64 build_font_options_t options); 65 66 #endif /* ifont1_INCLUDED */ 67