Text on path with vertical aligned text

Bug #168862 reported by Carignou
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Veronika Irvine

Bug Description

- Set a text to be vertical aligned
- Draw a guide (anything)
- "Put on path"

The text looks like disappearing... Actually, after unzooming a lot you see
that it has been translated far away from your starting object although the
text has the good shape.

The trick is just to translate the path until the text is in the right
position.

Of course it's not convenient and impossible to work with specific
coordinates.

Revision history for this message
Carignou (carignou) wrote :

Originator: YES

The other trick that everyone may have already used is to type "Enter"
after each letter to simulate a vertical alignment.

Revision history for this message
Carignou (carignou) wrote :

Originator: YES

Ok, I'm just stupid, this is not working at all.

Ryan Lerch (ryanlerch)
Changed in inkscape:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
ScislaC (scislac) wrote :

I can reproduce this with current svn. I'm not sure of how this should behave though, but it does seem a bit strange. I'll be honest, it's pretty unpredictable and kinda cool.

Changed in inkscape:
status: Incomplete → Confirmed
Revision history for this message
Will Pittenger (will-pittenger1) wrote :

You can't simulate vertical text if you want it on a path. Inkscape will strip the newline characters from the string.

su_v (suv-lp)
tags: added: text
removed: linux
Revision history for this message
Veronika Irvine (vmi) wrote :

I have been looking at this bug report because it is a nice little problem.

From the SVG specification (http://www.w3.org/TR/SVG/text.html#TextpathLayoutRules), it looks like the expected behaviour for vertical text is to have the horizontal midline perpendicular to the path (see attached diagram). That being said, the specification does not have a nice little diagram to clarify this and I have yet to find an SVG viewer that supports this behaviour. I will post a question to the SVG specification people to confirm my impression.

The code that would need to change to support this behaviour is Layout::fitToPathAlign(SVGLength const &startOffset, Path const &path) in Layout-TNG-Output.cpp. I will give a stab at adding vertical layout support to this class. The number of things that can be done with fonts and glyphs is pretty wild but I will give it a try.

Revision history for this message
Veronika Irvine (vmi) wrote :

I have a patch to fix this problem. It aligns the text perpendicular to the path as described in the SVG specification. I am still working on the selection appearance - it is a little bit off - but I think the rest of the behaviour is pretty solid. I would like to find some users experienced with languages using ligatures or vertical characters (as in some Asian languages) to make sure that this stuff is working correctly.

I have tested this patch against Head on Linux (Xubuntu 11.10) and Windows 7.

Veronika Irvine (vmi)
Changed in inkscape:
assignee: nobody → Veronika Irvine (vmi)
Veronika Irvine (vmi)
Changed in inkscape:
status: Confirmed → Fix Committed
su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.49
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
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.