[Gs-code-review] Remove pdf14_text_enum_t and related functions
raph at casper.ghostscript.com
Sat Feb 16 14:12:25 PST 2002
On Thu, Feb 14, 2002 at 10:06:52AM +0300, Igor V. Melichev wrote:
> [Log message beg]
> Remove pdf14_text_enum_t and related functions because they are unuseful.
> This change helps for FAPI project.
> [Log message end]
> Branches : HEAD.
> Note that pdf14_mark device is now being released by
> OTGuide.pdf now runs with FAPI.
> Soon I'll try same change for BBox device.
I agree with this change. Actually, the issue is not so much the
release of the pdf14_mark device (which, on inspection, wasn't even
being done explicitly by the pdf14_text_release procedure), as much as
the possibility of doing some work at the end of the show operation.
I think the implementation of the text knockout option (currently nyi)
will, in general, require popping a transparency group.
However, forwarding text enumerators, while well intentioned, is not
really a good solution. The interactions are simply too messy, and
there have been bugs in the mechanism for a long time. If I need to
invoke code, what I will do is override the text enum's release method
with my own implementation that does the additional work, then calls
the original method. I can stash any additional fields (such as the
pointer to the original method implementation) in the marking dev.
This is a hack, but if properly documented is better than any of the
alternatives I see.
I agree that a similar change may be worthwhile in for the bbox
device, as well. I haven't looked at it in detail just now, but it
is very plausible that the dereference of the imaging_dev in the
default text_enum release implementation is sufficient to do the
cleanup required for the bbox device as well.
So please commit this change (keeping in mind the move to casper),
and I look forward to reviewing the corresponding bbox patch.
More information about the gs-code-review