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: icharout.h 9043 2008-08-28 22:48:19Z giles $ */ 15 /* Interface to zcharout.c */ 16 17 #ifndef icharout_INCLUDED 18 # define icharout_INCLUDED 19 20 /* Execute an outline defined by a PostScript procedure. */ 21 int zchar_exec_char_proc(i_ctx_t *); 22 23 /* 24 * Get the metrics for a character from the Metrics dictionary of a base 25 * font. If present, store the l.s.b. in psbw[0,1] and the width in 26 * psbw[2,3]. 27 */ 28 typedef enum { 29 metricsNone = 0, 30 metricsWidthOnly = 1, 31 metricsSideBearingAndWidth = 2 32 } metrics_present; 33 int /*metrics_present*/ 34 zchar_get_metrics(const gs_font_base * pbfont, const ref * pcnref, 35 double psbw[4]); 36 37 /* Get the vertical metrics for a character from Metrics2, if present. */ 38 int /*metrics_present*/ 39 zchar_get_metrics2(const gs_font_base * pbfont, const ref * pcnref, 40 double pwv[4]); 41 /* Get CDevProc. */ 42 bool zchar_get_CDevProc(const gs_font_base * pbfont, ref **ppcdevproc); 43 44 /* 45 * Consult Metrics2 and CDevProc, and call setcachedevice[2]. Return 46 * o_push_estack if we had to call a CDevProc, or if we are skipping the 47 * rendering process (only getting the metrics). 48 */ 49 int zchar_set_cache(i_ctx_t *i_ctx_p, const gs_font_base * pbfont, 50 const ref * pcnref, const double psb[2], 51 const double pwidth[2], const gs_rect * pbbox, 52 op_proc_t cont, op_proc_t *exec_cont, 53 const double Metrics2_sbw_default[4]); 54 55 /* 56 * Get the CharString data corresponding to a glyph. Return typecheck 57 * if it isn't a string. 58 */ 59 int zchar_charstring_data(gs_font *font, const ref *pgref, 60 gs_glyph_data_t *pgd); 61 62 /* 63 * Enumerate the next glyph from a directory. This is essentially a 64 * wrapper around dict_first/dict_next to implement the enumerate_glyph 65 * font procedure. 66 */ 67 int zchar_enumerate_glyph(const gs_memory_t *mem, const ref *prdict, int *pindex, gs_glyph *pglyph); 68 69 #endif /* icharout_INCLUDED */ 70