Felipe Rech Meneguzzi wrote:

We traced the code responsible for the generation of curves instead of text primitives to lines 190-197 of the PSTextPainter class, in particular this
> piece:

Object rcDel = aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER); if (!(rcDel instanceof SVGOMTextElement)) { log.trace("-> spans found"); hasunsupported = true; //Filter spans }

In which the attribute requested to the AttributedCharacterIterator aci returns null to rcDel. Considering that this object is later checked for being an instance of SVGOMTextElement, it stroke me as this might not be exactly the expected behavior in this situation. This situation obviously is due to something performed in the building of the GVT, but we could not trace that so far.

This is _very_ odd. Can you provide a reproducible test case? It might only take sample content. I'm not sure that this attribute is normally examined this far down the rendering chain.

We developed a somewhat quick and dirty "hack" that seems to be working so far, which basically consists of changing

Gahh!!! this is pretty ugly :) You would be _much_ better off either adding a check for 'null' to the if (treat a null as being supported), or simply removing the check completely. The best thing to do would be to remove this check and add back the check in the PSTextElementBridge for 'isSimple()' - this is pretty good for looking for the various text elements that could trip up the 'simple' text path.

So far this works fine, that is, we use our version of the PS Text painter and it generates correct PS/EPS output with text primitives instead of curves. We have yet to discover how to change the GVT building to deal with that appropriately.

One important thing that we remain to discover is whether or not these "spams" the code refer to SVG <tspam> elements, in which case the GVT building would not be correct since the SVG examples we are using have no <tspam> elements, and so it does not seem likely that these constructs should end up in the object representation.

Yes, the span's it is looking for refer to the SVG tspan element (or the textPath element), there might also be 'a' elements - although those should not cause a rendering problem. Getting null here is very odd every aci should have that attribute and it should refer to an element in the DOM.

        Meanwhile I'll look further into the GVT building and related stuff.

Regards,

_____________________
Felipe Rech Meneguzzi
[EMAIL PROTECTED]
_____________________
-----Mensagem original-----
De: Jeremias Maerki [mailto:[EMAIL PROTECTED] Enviada em: quarta-feira, 7 de julho de 2004 11:45
Para: [EMAIL PROTECTED]
Assunto: Re: More on PSTranscoder


While working on the PS transcoder I spent a lot of time tuning the
TextPainter. Some time ago we had an option that let us switch the
TextPainter on and off (as a backdoor). We removed that as the code to
determine when the TextPainter could be used was improved (but it's
still far from perfect). I've been pretty defensive with using the
TextPainter instead of stroking the text which currently leads to a lot
of text being painted as shapes. Mostly, I've done this because I still
haven't mastered GVT.

On 06.07.2004 15:06:45 Felipe Rech Meneguzzi wrote:

Besides that, I am looking the PS/EPS transcoder and as far as I have
seen, one of the problems I encountered while trying to do my version
of it is happening, in particular, the transformation of text information
to curves, even when the transcoder is instructed not to do that. When
I encountered this problem before, I saw it had to do with the TextPainter
implementation and it encountering "spans" in the GVT Text
representation.



Jeremias Maerki


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/6/2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/6/2004



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to