1 /* Copyright (C) 1996, 2000, 2001 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: gsgcache.h,v 1.2 2004/11/15 01:12:06 ray Exp $ */ 18 /* Glyph data cache definition. */ 19 20 #ifndef gxgcache_INCLUDED 21 # define gxgcache_INCLUDED 22 23 /* Using : */ 24 25 #ifndef gs_font_type42_DEFINED 26 # define gs_font_type42_DEFINED 27 typedef struct gs_font_type42_s gs_font_type42; 28 #endif 29 30 #ifndef gs_glyph_data_DEFINED 31 # define gs_glyph_data_DEFINED 32 typedef struct gs_glyph_data_s gs_glyph_data_t; 33 #endif 34 35 #ifndef stream_DEFINED 36 # define stream_DEFINED 37 typedef struct stream_s stream; 38 #endif 39 40 /* Data type definition : */ 41 42 #ifndef gs_glyph_cache_DEFINED 43 # define gs_glyph_cache_DEFINED 44 typedef struct gs_glyph_cache_s gs_glyph_cache; 45 #endif 46 47 typedef int (*get_glyph_data_from_file)(gs_font_type42 *pfont, stream *s, uint glyph_index, 48 gs_glyph_data_t *pgd); 49 50 51 /* Methods : */ 52 53 gs_glyph_cache *gs_glyph_cache__alloc(gs_font_type42 *pfont, stream *s, 54 get_glyph_data_from_file read_data); 55 int gs_glyph_cache__release(void /* gs_glyph_cache */ *data, void*); 56 int gs_get_glyph_data_cached(gs_font_type42 *pfont, uint glyph_index, gs_glyph_data_t *pgd); 57 58 #endif /* gxgcache_INCLUDED */ 59