Bug 6425 - <textPath> element not implemented
Summary: <textPath> element not implemented
Status: RESOLVED DUPLICATE of bug 12698
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 6420 12376
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-08 01:52 PST by Eric Seidel (no email)
Modified: 2007-03-04 04:37 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2006-01-08 01:52:27 PST
<textPath> element not implemented
http://www.w3.org/TR/SVG/text.html#TextPathElement

This will require further enhancements to RenderText.  Once list offsets and rotations are respected, this 
becomes a straightforward extension of that logic.
Comment 1 Eric Seidel (no email) 2006-12-31 13:11:33 PST
We now have path measuring in place with bug 12033.  I even added a couple member variables to PathTraversalState which could be used by future traversal code to lay out text on a path.

        // FIXME: for (non-implemented) text-on-path layout
        Vector<float> m_offsets;
        Vector< std::pair<FloatPoint, float> > m_pointAndAngles;

Calculating the normal vectors for the curve as its measured is very easy.  Once the curveLength function finds two points sufficiently close it stops, at that point, the line between those two points is tangent to the normal.  Given that normal and a point obtained (in the same was as pointAtLength obtains points) that should be sufficient to place the text.  I don't know enough about the text system (and what points might be desired) so I haven't wired that part up.  But the actual path traversal/measurement/normal calculation code should be very straightforward.
Comment 2 Nikolas Zimmermann 2007-03-04 04:37:23 PST

*** This bug has been marked as a duplicate of 12698 ***