text-anchor incorrectly inherited in tspan

Bug #168023 reported by Henrykhecht
2
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

With the following SVG:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.1"
     baseProfile="full"
     width="720"
     height="200">
      <text style="font-family: Helvetica, Arial,
sans-serif; font-size: 33.33333333336933;"
            text-anchor="middle"
            x="300"
            y="50"
            dy="1em">Middle Anchored<tspan
style="font-size: 19.444444444465443; font-weight: normal;"
            text-anchor="end"
                x="600">End Anchored</tspan>
      </text>
</svg>

The text in the <text> is correctly middle-anchored,
but the tspan is not end-anchored (it remains
middle-anchored at x=600). The above is handled
correctly by Batik, Illustrator 12, and Sketsa.

This is with Inkscape 0.44.1 on Linux.

Tags: svg text
Revision history for this message
Bryce Harrington (bryce) wrote :

This is a bug left from Sodipodi days, but one I too have found quite annoying. This is a good test case for it.

Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Bryce Harrington (bryce)
Changed in inkscape:
milestone: none → 0.46.1
jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.46.1 → 0.48
tags: added: text
Revision history for this message
jazzynico (jazzynico) wrote :

@Richard, are you working on this issue (the report is assigned to you)?

Changed in inkscape:
milestone: 0.48 → none
Revision history for this message
Richard Hughes (cyreve) wrote :

No. Go for it if you're interested.

Revision history for this message
Codain (codain) wrote :

Tested on Windows Inkscape 0.48.2 and it seems this bug is gone. Same align result on Inkscape, Firefox 9 and IE 9.

Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP, Inkscape 0.48.2 and trunk revision 10923.
@Romain - Try with different text-anchor values in the XML editor (start; middle; end) and see how it behaves in Inkscape compared to Batik or Firefox.

Setting importance to "medium" in accordance to http://wiki.inkscape.org/wiki/index.php/Bug_management#Bug_importance

Changed in inkscape:
assignee: Richard Hughes (cyreve) → nobody
importance: High → Medium
Revision history for this message
ifurkend (ifurkend) wrote :

The problem still remains in 0.48.4. The text-anchor value in tspan always inherit the same value of the master text or the FIRST tspan elements. For example, if the text-anchor of the master text and the first tspan elements are undefined, text-anchor (middle or end) will have no effect even if you have define it in the subsequent tspan elements. Text-anchor or the first tspan will override the text-element value if defined.

One thing that is even more complicated is the fact that many up-to-date browsers (IE, Mozilla-based and Opera) have their default value of text-anchor set to "start" instead of "inherited" as required in the W3C specification.

Revision history for this message
su_v (suv-lp) wrote :

Still present with latest trunk r12701 (tested on OS X 10.7.5).

Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Hi, this issue is being tracked in https://gitlab.com/inkscape/inkscape/-/issues/1068. Closing as part of Inkscape's bug migration.

Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.