xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helder Magalhães" <helder.magalh...@gmail.com>
Subject Re: Fw: SVG Text rendering
Date Mon, 17 Nov 2008 13:56:06 GMT
> I attach the test file: a set of roads in London's West End. Viewing
> this in Safari or Firefox gives you an idea of what I expect. The pdf
> I get from batik shows a complete blank.

Opening the file using Squiggle also shows a blank document. Opening
it using Firefox and Opera renders the text as expected (?).

By analyzing the document and making some experiments, it seems that
the text nodes (implicitly created by the XML indentation used) are
confusing Batik. It seems that the horizontal position of each
"textPath" isn't tracked down separately within a single "text"
element. More information can be found in the attached test case
("ReducedTestCase.svg"): the text "KO" is horizontally placed
immediately after "broken" although it should start at the beginning
of the path (left aligned). Unfortunately, I haven't found information
within the specification supporting this - are "textPath" supposed to
be capable of this within a single "text" element?. Several working
cases are also available (though commented) within the test case.

Current workarounds seem to be:
 - Remove all indenting white space ("Workaround-AvoidIndenting.svg")
 - Enclosing each "textPath" element in its own "text" element
("Workaround-UseASeparateTextElementForEachTextPath.svg");

This may have (though pretty unrelated) have something to do with bug 45723 [2].

Hope this helps,

 Helder Magalhães


[1] http://www.w3.org/TR/SVG/text.html#TextPathElement
[2] https://issues.apache.org/bugzilla/show_bug.cgi?id=45723

Mime
View raw message