Hebrew text-anchor reversed?

Bug #1169348 reported by David Mathog
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Medium
Unassigned

Bug Description

I seem to have something backwards in my understanding of SVG RTL text, either that or there is a widespread bug
in Right to Left text handling in SVG viewers.

In the attached SVG there are two <text> instances of a Hebrew phrase and two <text> instances of an
English phrase. Each pair has the same x,y value, with the RED one having style set with "text-anchor:end"
and the BLACK one with the default (== "text-anchor:start"). Both pairs have the same "x" value, and a vertical line
is drawn there to mark it.

The problem is, according to my reading of:

   http://www.w3.org/TR/SVG/text.html#DirectionProperty

the Hebrew example displays with the two examples swapped: the one which is red should be black and vice versa.
(In Inkscape when the text is selected the "anchor" is shown as a small square, so it is very clear
that the anchor is not on the vertical line in either of the two Hebrew cases.)

The English phrases conform to the description on the link above: setting "text-anchor:end" places "end"
on x,y, and not setting it (== "text-anchor:start") puts "start" on x,y.

However, for Hebrew, with no modification (== "text-anchor:start") "start"
is not on x,y, "end" is; and when "text-anchor:end" is set then the "start" point is on x,y - exactly
the reverse of the SVG description.

There is some discussion of "direction" at that URL, but setting that value to rtl made no difference
whatsoever. The observed behavior seems to contradict the description of the text-anchor:

   http://www.w3.org/TR/SVG/text.html#TextAnchorProperty

However, since this was the way the example displayed in Inkscape, Seamonkey, and Opera, most likely
it is my understanding that is off and not all three implementations. (Although... the
the observed display behavior is exactly what is expected if "start" always means LEFT and
"end" always means RIGHT, which is precisely the bug expected if somewhere RTL was treated like
LTR.)

Will post a screen shot next.

Tags: text rtl
Revision history for this message
David Mathog (mathog) wrote :
Revision history for this message
David Mathog (mathog) wrote :
jazzynico (jazzynico)
tags: added: text
Changed in inkscape:
importance: Undecided → Medium
Martin Owens (doctormo)
Changed in inkscape:
assignee: nobody → Martin Owens (doctormo)
status: New → Confirmed
Martin Owens (doctormo)
Changed in inkscape:
assignee: Martin Owens (doctormo) → nobody
Revision history for this message
Tavmjong Bah (tavmjong-free) wrote :

I have "fixed" this in that Inkscape will now pay attention to the 'direction' property. A GUI for setting this property is still needed.

Note, to take full advantage of the 'direction' property (such as to reverse text), the 'unicode-bidi' property must be implemented.

jazzynico (jazzynico)
tags: added: rtl
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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