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