summaryrefslogtreecommitdiff
path: root/gs/src/gxchar.h
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>1999-10-03 08:21:45 +0000
committerHenry Stiles <henry.stiles@artifex.com>1999-10-03 08:21:45 +0000
commitee50b36ccabde111c6d77c5f9892213d53060a18 (patch)
tree35f7e38774b082c4cdbe4f4fad881903862a83c2 /gs/src/gxchar.h
parent0ea97dbf2a40bc347a20134197643bc1daef6de8 (diff)
This is the first gs593 integration it is *NOT* a release. Normally
each file is checked in with an associated log entry, in order to check in all of the code simultaneously we batch all of the file name's modified and change descriptions here (Note: Aladdin code changes are documented in gs/doc/News.htm) - pcstate.h - removes show enumeration from pcl state. - pctop.c, pxtop.c - gs_grestore_no_wraparound()'s is now gs_grestore_only(). - pxgstate.c - ENUM_RETURN_CONST_STRING_PTR() now takes a gs string argument instead of the string's data as it did previously. - plmain.c - - The library no longer initializes io devices. Adds gs_iodev_init() to main() procedure. Also, gs_c_param_list_rewrite() is renamed to gs_c_param_list_write_more(). - pcltop.mak - adds pipe.dev for operating system pipe support. - pctext.c, pglabel.c, pxfont.c, plfont.c - extensive modifications to support the text api (gstext.h) - use gs_text_enum_t instead of gs_show_enum. - removes enumeration allocation, this is now done by the text "begin" functions. - update "next_char" procs and "encode char" procs to take a glyph argument and the character argument is now passed by value (pcl nor xl make use of the glyph argument). - char_path_n_init() replaced with gs_charpath_begin(). - gs_show_n_init() replaced with gs_show_begin(). - gs_show_next() is now handled by gs_process_text(). - gs_release_text() added. - gs_xyshow_n_init() replace with gs_xyshow_begin(). Passing of x and y coordinates modified to support the new interface. Unfortunately, we need to transform the coordinates into the space of the font scaling matrix, that is the current ctm for xl when the the text is processed. This differs from postscript which appears to have the regular user->device matrix in the graphics state during processing. - (plfont.c) - gs_notify_init() is now part of the pfont initialization procedure, related TODO: cut over to gs_font_alloc() and gs_font_base_alloc(). - all gs files - removes uninitialized rcs identifiers. KNOWN PROBLEMS: occassional pxl and pcl crashes in gdev_mem_set_line_ptrs() when running in color due to null base (data) pointer. git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@985 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'gs/src/gxchar.h')
-rw-r--r--gs/src/gxchar.h77
1 files changed, 10 insertions, 67 deletions
diff --git a/gs/src/gxchar.h b/gs/src/gxchar.h
index 8eef4d3e5..cd2fc15c6 100644
--- a/gs/src/gxchar.h
+++ b/gs/src/gxchar.h
@@ -30,59 +30,30 @@
#ifndef cached_char_DEFINED
# define cached_char_DEFINED
typedef struct cached_char_s cached_char;
-
#endif
/* The type of cached font/matrix pairs is opaque. */
#ifndef cached_fm_pair_DEFINED
# define cached_fm_pair_DEFINED
typedef struct cached_fm_pair_s cached_fm_pair;
-
#endif
/* The type of font objects is opaque. */
#ifndef gs_font_DEFINED
# define gs_font_DEFINED
typedef struct gs_font_s gs_font;
-
#endif
/* The types of memory and null devices may be opaque. */
#ifndef gx_device_memory_DEFINED
# define gx_device_memory_DEFINED
typedef struct gx_device_memory_s gx_device_memory;
-
#endif
#ifndef gx_device_null_DEFINED
# define gx_device_null_DEFINED
typedef struct gx_device_null_s gx_device_null;
-
#endif
-/*
- * Define the stack for composite fonts.
- * If the current font is not composite, depth = -1.
- * If the current font is composite, 0 <= depth <= max_font_depth.
- * items[0] through items[depth] are occupied.
- * items[0].font is the root font; items[0].index = 0.
- * The root font must be composite, but may be of any map type.
- * items[0..N-1] are modal composite fonts, for some N <= depth.
- * items[N..depth-1] are non-modal composite fonts.
- * items[depth] is a base (non-composite) font.
- * Note that if depth >= 0, the font member of the graphics state
- * for a base font BuildChar/Glyph is the same as items[depth].font.
- */
-#define max_font_depth 5
-typedef struct gx_font_stack_item_s {
- gs_font *font; /* font at this level */
- uint index; /* index of this font in parent's */
- /* Encoding */
-} gx_font_stack_item;
-typedef struct gx_font_stack_s {
- int depth;
- gx_font_stack_item items[1 + max_font_depth];
-} gx_font_stack;
-
/* An enumeration object for string display. */
typedef enum {
sws_none,
@@ -93,32 +64,8 @@ typedef enum {
struct gs_show_enum_s {
/* Put this first for subclassing. */
gs_text_enum_common; /* (procs, text, index) */
-
-#define SHOW_IS(penum, op_mask)\
- (((penum)->text.operation & (op_mask)) != 0)
-#define SHOW_IS_ALL_OF(penum, op_mask)\
- (((penum)->text.operation & (op_mask)) == (op_mask))
- /*
- * The comments next to the following macros indicate the
- * corresponding test in pre-5.24 filesets.
- */
-#define SHOW_IS_ADD_TO_ALL(penum) /* add */\
- SHOW_IS(penum, TEXT_ADD_TO_ALL_WIDTHS)
-#define SHOW_IS_ADD_TO_SPACE(penum) /* wchr != no_char */\
- SHOW_IS(penum, TEXT_ADD_TO_SPACE_WIDTH)
-#define SHOW_IS_DO_KERN(penum) /* do_kern */\
- SHOW_IS(penum, TEXT_INTERVENE)
-#define SHOW_IS_XYCSHOW(penum) /* do_kern < 0 */\
- (SHOW_IS_DO_KERN(penum) &&\
- SHOW_IS(penum, TEXT_REPLACE_X_WIDTHS | TEXT_REPLACE_Y_WIDTHS | TEXT_DO_NONE))
-#define SHOW_IS_SLOW(penum) /* slow_show */\
- SHOW_IS(penum, TEXT_ADD_TO_ALL_WIDTHS | TEXT_ADD_TO_SPACE_WIDTH | TEXT_INTERVENE)
-#define SHOW_IS_DRAWING(penum) /* !stringwidth_flag */\
- !SHOW_IS(penum, TEXT_DO_NONE)
-#define SHOW_IS_STRINGWIDTH(penum) /* stringwidth_flag > 0 */\
- SHOW_IS_ALL_OF(penum, TEXT_DO_NONE | TEXT_RETURN_WIDTH)
-
/* Following are set at creation time */
+ bool auto_release; /* true if old API, false if new */
gs_state *pgs;
int level; /* save the level of pgs */
gs_char_path_mode charpath_flag;
@@ -132,9 +79,7 @@ struct gs_show_enum_s {
gs_int_rect obox; /* int version of (outer) clip box */
int ftx, fty; /* transformed font translation */
/* Following are updated dynamically */
- gs_glyph(*encode_char) (P3(gs_show_enum *, gs_font *, gs_char *));
- /* copied from font, */
- /* except for glyphshow */
+ gs_glyph (*encode_char)(P3(gs_font *, gs_char, gs_glyph_space_t)); /* copied from font */
gs_log2_scale_point log2_suggested_scale; /* suggested scaling */
/* factors for oversampling, */
/* based on FontBBox and CTM */
@@ -143,26 +88,24 @@ struct gs_show_enum_s {
/* if dev_cache is an alpha buffer */
gx_device_null *dev_null; /* null device for stringwidth */
/*uint index; */ /* index within string */
- gs_char current_char; /* current char for render or move */
- gs_glyph current_glyph; /* current glyph ditto */
- int cmap_code; /* for FMapType 9 composite fonts, */
- /* the value returned by decode_next */
+ /*uint xy_index;*/ /* index within X/Y widths */
+ /*gs_char returned.current_char;*/ /* current char for render or move */
+ /*gs_glyph returned.current_glyph;*/ /* current glyph ditto */
gs_fixed_point wxy; /* width of current char */
/* in device coords */
gs_fixed_point origin; /* unrounded origin of current char */
/* in device coords, needed for */
/* charpath and WMode=1 */
cached_char *cc; /* being accumulated */
- gs_point width; /* total width of string, set at end */
+ /*gs_point returned.total_width;*/ /* total width of string, set at end */
show_width_status width_status;
- gs_log2_scale_point log2_current_scale;
- gx_font_stack fstack;
+ /*gs_log2_scale_point log2_scale;*/
int (*continue_proc) (P1(gs_show_enum *)); /* continuation procedure */
};
-
#define gs_show_enum_s_DEFINED
-#define private_st_gs_show_enum() /* in gschar.c */\
- gs_private_st_composite(st_gs_show_enum, gs_show_enum, "gs_show_enum",\
+/* The structure descriptor is public for gschar.c. */
+#define public_st_gs_show_enum() /* in gxchar.c */\
+ gs_public_st_composite(st_gs_show_enum, gs_show_enum, "gs_show_enum",\
show_enum_enum_ptrs, show_enum_reloc_ptrs)
/* Cached character procedures (in gxccache.c and gxccman.c) */