text-anchor incorrectly inherited in tspan

Bug #168023 reported by Henrykhecht on 2006-10-10
Affects Status Importance Assigned to Milestone

Bug Description

With the following SVG:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
      <text style="font-family: Helvetica, Arial,
sans-serif; font-size: 33.33333333336933;"
            dy="1em">Middle Anchored<tspan
style="font-size: 19.444444444465443; font-weight: normal;"
                x="600">End Anchored</tspan>

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.

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) on 2008-02-01
Changed in inkscape:
milestone: none → 0.46.1
jazzynico (jazzynico) on 2010-01-18
Changed in inkscape:
milestone: 0.46.1 → 0.48
tags: added: text
jazzynico (jazzynico) wrote :

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

Changed in inkscape:
milestone: 0.48 → none
Richard Hughes (cyreve) wrote :

No. Go for it if you're interested.

Romain (romain2boss) 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.

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
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.

~suv (suv-lp) wrote :

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

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

Other bug subscribers