1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
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.
14
/* $Id: ichar.h 9043 2008-08-28 22:48:19Z giles $ */
15
/* Character rendering operator definitions and support procedures */
16
/* Requires gstext.h */
18
#ifndef ichar_INCLUDED
19
# define ichar_INCLUDED
22
* All the character rendering operators use the execution stack
23
* for loop control -- see estack.h for details.
24
* The information pushed by these operators is as follows:
25
* the enumerator (t_struct, a gs_text_enum_t);
26
* a slot for the procedure for kshow or cshow (probably t_array);
27
* a slot for the saved o-stack depth for cshow or stringwidth,
28
* and for error recovery (t_integer);
29
* a slot for the saved d-stack depth ditto (t_integer);
30
* a slot for the saved gstate level ditto (t_integer);
31
* a slot for saving the font during the cshow proc (t_struct);
32
* a slot for saving the root font during the cshow proc (t_struct);
33
* the procedure to be called at the end of the enumeration
34
* (t_operator, but called directly, not by the interpreter);
35
* the usual e-stack mark (t_null).
38
#define esenum(ep) r_ptr(ep, gs_text_enum_t)
39
#define senum esenum(esp)
40
#define esslot(ep) ((ep)[-1])
41
#define sslot esslot(esp)
42
#define esodepth(ep) ((ep)[-2])
43
#define sodepth esodepth(esp)
44
#define esddepth(ep) ((ep)[-3])
45
#define sddepth esddepth(esp)
46
#define esgslevel(ep) ((ep)[-4])
47
#define sgslevel esgslevel(esp)
48
#define essfont(ep) ((ep)[-5])
49
#define ssfont essfont(esp)
50
#define esrfont(ep) ((ep)[-6])
51
#define srfont esrfont(esp)
52
#define eseproc(ep) ((ep)[-7])
53
#define seproc eseproc(esp)
55
/* Procedures exported by zchar.c for zchar*.c. */
56
gs_text_enum_t *op_show_find(i_ctx_t *);
57
int op_show_setup(i_ctx_t *, os_ptr);
58
int op_show_enum_setup(i_ctx_t *);
59
int op_show_finish_setup(i_ctx_t *, gs_text_enum_t *, int, op_proc_t);
60
int op_show_continue(i_ctx_t *);
61
int op_show_continue_pop(i_ctx_t *, int);
62
int op_show_continue_dispatch(i_ctx_t *, int, int);
63
int op_show_free(i_ctx_t *, int);
64
void glyph_ref(const gs_memory_t *mem, gs_glyph, ref *);
65
int finish_stringwidth(i_ctx_t *);
67
/* Exported by zchar.c for zcharout.c */
68
bool zchar_show_width_only(const gs_text_enum_t *);
69
int zsetcachedevice(i_ctx_t *);
70
int zsetcachedevice2(i_ctx_t *);
72
#endif /* ichar_INCLUDED */