You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Dean Jackson <de...@w3.org> on 2000/11/10 17:54:55 UTC

[commit] textPath

I've commited <textPath>. Test file samples/tests/textPath.svg

It handles:
  - align start, middle and end
  - text offset
  - text Length (stretch/expand the glyphs
    or the character spacing)
  - filter, etc on the textPath
  - all style attributes like stroke, fill ....

Doesn't handle:
  - spacing (auto or exact)
  - selection

At the moment, <textPath> cannot be a child
of the <text> element (it is supposed to be, this
means the examples ARE NOT VALID SVG).
This would have meant getting into the <text> bridge
code which I didn't want to do until we had a 
complete layout solution.

I've started on some code to warp the glyphs
around the curve (as opposed to simple alignment).
This is the method = "align | stretch" property
on textPath.

The code is not great, but it works. It's pretty
hard to get a textPath element to look 
really nice unless you have a fairly flat path
element. I've spent a few days fiddling with
various bits only to find that it is difficult
to get an algorithm that works well with all 
text strings, paths and font sizes.

The good news is that I think we can do a
reasonable job of a text layout engine
for Batik that will handle System and SVG
fonts (with arbitrary SVG glyphs), text
lengths, tspan and "some" internationalisation.

Theirry, Stephane and I will discuss text layout
possibly on Monday, then we can distribute a design
document for comments.

dean