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