You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2010/08/10 16:12:12 UTC

DO NOT REPLY [Bug 49736] New: Trailing whitespace in tspan elements breaks text-anchor alignment (only on Windows?)

https://issues.apache.org/bugzilla/show_bug.cgi?id=49736

           Summary: Trailing whitespace in tspan elements breaks
                    text-anchor alignment (only on Windows?)
           Product: Batik
           Version: 1.8
          Platform: PC
               URL: http://mail-archives.apache.org/mod_mbox/xmlgraphics-b
                    atik-users/201008.mbox/browser#msg-1
        OS/Version: Windows Vista
            Status: NEW
          Severity: minor
          Priority: P3
         Component: GVT Text
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: helder.magalhaes@gmail.com


Trailing whitespace seems to trigger a weird issue where text contents are
thrown right a lot more than expected. It's as if "text-anchor" inheritance was
no longer honored in these cases (and reset to "start", the lacuna value).

Bug's URL points to a thread ("JSVGCanvas Problems - Rendering and Writing")
which contains the original test case and a modified test case which doesn't
reproduce the issue (basically, with trailing whitespace trimmed).

According to the thread, the issue doesn't seem to reproduce on Linux. Can
anyone else confirm and provide information for MacOS as well?

Bug 41451 seems tightly related, although the issue is not quite the same (it
refers to a MacOS-specific issue). Also, thread "tspans fail to line up" [1]
seems related as well. I wonder if all these are the same...?

A possible workaround is to make sure tspan elements don't contain trailing
whitespace.

[1]
http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/200701.mbox/browser#msg-19

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 49736] Trailing whitespace in tspan elements breaks text-anchor alignment (only on Windows?)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49736

--- Comment #4 from Henryk Hecht <nv...@hhecht.e4ward.com> 2011-06-15 22:49:41 UTC ---
I recently (re)reported what appears to be this bug on the mailing list:
http://thread.gmane.org/gmane.text.xml.batik.user/15374
The symptoms are closer to comment #3 (multiple tspans within a text element)
than to the original report (tspans with trailing whitespace).  In my case, the
following is true:
1) It only occurs on 1.6 JVMs (on both linux and windows); not on 1.5 JVMs on
either platform
2) Removing whitespace between succeeding tspans is sufficient: text-to-tspan
whitespace is irrelevant.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 49736] Trailing whitespace in tspan elements breaks text-anchor alignment (only on Windows?)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49736

--- Comment #3 from Christoffer Bruun <cd...@flyingpigs.dk> 2011-04-28 06:53:37 EDT ---
I have encountered this/similar problem while using FOP 1.0 to render a PDF
that included some svg figures included by fo:externalGraphic.

The PNG image rendered by PNGTranscoder on the same SVG input looks correct.

In my case it was not sufficient to remove whitespace between <tspan> ...
</tspan>
I also had to remove all white space between <text> and <tspan>

e.g.

<text style="text-anchor: middle">
   <tspan>..</tspan>
   <tspan>..</tspan>
</text> 

must be turned into

<text style="text-anchor: middle"><tspan>..</tspan><tspan>..</tspan></text> 

in order to work

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 49736] Trailing whitespace in tspan elements breaks text-anchor alignment (only on Windows?)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49736

--- Comment #1 from Helder Magalhães <he...@gmail.com> 2010-08-10 10:20:30 EDT ---
Created an attachment (id=25875)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25875)
Testcase which reproduces the behavior

As stated in comment #0, it's like the trailing whitespace in tspan elements
caused the text-anchor="middle" inheritance to be ignored. Changing the
testcase to use text-anchor="end" has a similar behavior; setting it to
text-anchor="start" makes the issue invisible.

Note that I've used a fixed YY shift (dy="17") instead of a relative one
(dy="1.1em") so that the test case also works in Inkscape (which, at least in
version 0.47, doesn't seem to support "em" coordinates).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 49736] Trailing whitespace in tspan elements breaks text-anchor alignment (only on Windows?)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49736

Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maik.riechert@arcor.de

--- Comment #2 from Helder Magalhães <he...@gmail.com> 2010-09-20 04:55:16 EDT ---
*** Bug 49958 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


[Bug 49736] Trailing whitespace in tspan elements breaks text-anchor alignment (only on Windows?)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49736

Daniel Grob <da...@edorasware.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.grob@edorasware.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


[Bug 49736] Trailing whitespace in tspan elements breaks text-anchor alignment (only on Windows?)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49736

Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |subramanyas@rediffmail.com

--- Comment #5 from Helder Magalhães <he...@gmail.com> ---
*** Bug 53597 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org