Summary: | Driver Text processing | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Tony Teveris <tteveris> |
Component: | General | Assignee: | Default assignee <ghostpdl-bugs> |
Status: | NOTIFIED WORKSFORME | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.63 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Customer: | 400 | Word Size: | --- |
Description
Tony Teveris
2009-07-21 12:12:51 UTC
Its late here, but since nobody else has replied yet.... I think the answer is simple, when you don't want GS to do anything with the text, don't call gx_default_text_begin, when you want it to process the text, you should call gx_default_text_begin. No that will not work because when you return from my gimp_text_begin() it will GPF in the following function. static int zshow(i_ctx_t *i_ctx_p) { os_ptr op = osp; gs_text_enum_t *penum; int code = op_show_setup(i_ctx_p, op); if (code != 0 || (code = gs_show_begin(igs, op->value.bytes, r_size(op), imemory, &penum)) < 0) return code; CRASH HERE *(op_proc_t *)&penum->enum_client_data = zshow; if ((code = op_show_finish_setup(i_ctx_p, penum, 1, finish_show)) < 0) { ifree_object(penum, "op_show_enum_setup"); return code; } return op_show_continue_pop(i_ctx_p, 1); So I assume some "dummy" functions must be setup or a special return code. } OK, that's really a different question. You *do* need to set up the text enumerator. As long as you call gx_default_text_begin it will do that for you. However, you probably don't want to call any of the default text functions, so you need to create (or at least initialise) the enumerator yourself. I was assuming you were already aware of this, my mistake. You will need to define you own methods in the enumerator, I'd suggest looking at gdev_pdf_text_begin in gdevpdtt.c. This is the pdfwrite device text processing code, in this routine it allocates an enumerator (subclassed from the default text enumerator), sets up some PDF-specific fields and calls gs_text_enum_init in order to set up the methods for dealing with text. You will need to do much of the same work. OK, I got it. Changing customer bugs that have been resolved more than a year ago to closed. |