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: ifont42.h 9043 2008-08-28 22:48:19Z giles $ */ 15 /* Procedure for building a Type 42 or CIDFontType 2 font */ 16 17 #ifndef ifont42_INCLUDED 18 # define ifont42_INCLUDED 19 20 /* Build a type 11 (TrueType CID-keyed) or 42 (TrueType) font. */ 21 int build_gs_TrueType_font(i_ctx_t *, os_ptr, gs_font_type42 **, font_type, 22 gs_memory_type_ptr_t, const char *, const char *, 23 build_font_options_t); 24 25 /* 26 * Check a parameter for being an array of strings. Return the parameter 27 * value even if it is of the wrong type. 28 */ 29 int font_string_array_param(const gs_memory_t *mem, os_ptr, const char *, ref *); 30 31 /* 32 * Get a GlyphDirectory if present. Return 0 if present, 1 if absent, 33 * or an error code. 34 */ 35 int font_GlyphDirectory_param(os_ptr, ref *); 36 37 /* 38 * Get a glyph outline from GlyphDirectory. Return an empty string if 39 * the glyph is missing or out of range. 40 */ 41 int font_gdir_get_outline(const gs_memory_t *mem, const ref *, long, gs_glyph_data_t *); 42 43 /* 44 * Access a given byte offset and length in an array of strings. 45 * This is used for sfnts and for CIDMap. The int argument is 2 for sfnts 46 * (because of the strange behavior of odd-length strings), 1 for CIDMap. 47 * Return code : 0 - success, <0 - error, 48 * >0 - number of accessible bytes (client must cycle). 49 * - mru_index/pos are used as a hint where to start searching; NULLs for no hint. 50 */ 51 int string_array_access_proc(const gs_memory_t *mem, const ref *, int, ulong, uint, 52 uint *mru_index, ulong *mru_pos, const byte **); 53 54 #endif /* ifont42_INCLUDED */ 55