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.

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

The line: 

hasunsupported = true; //Filter spans

for

aci.getAttributes().put(
        GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER,
        new SVGOMTextElement("svg", null));


        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.

        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]

Reply via email to