Text chapter rewrite

Hi,

I have made a first stab at rewriting the text chapter to support
auto-wrapped text. Following Cameron's feedback, I've made text layout a
two step process. The first step it to layout the text according to CSS
rules. The second step is to apply SVG specific transforms ('dx', 'dy',
'text-anchor', etc.) depending on which type of text layout is to be
used.

Three types of text layout are possible:

1. Pre-formatted text.

  This is equivalent to SVG 1.1 text except that multi-line text is
  possible using the new 'white-space' property to preserve new lines.

2. Auto-wrapped text.

  This is text wrapping inside a rectangle or shape.

3. Text on a path.

  This is a single line of pre-formatted text that is then
  transformed to match the path. (No change from SVG 1.1.)

In order to layout text according to CSS, one must first have a 'content
area'. This is equivalent to the content area in the CSS2 box model and
in CSS3 Exclusions. If the content area is explicitly declared, one uses
the rules for auto-wrapped text. If the content area is not explicitly
declared, one uses the rules for pre-formatted text with a content area
that consists of a rectangle of infinite width and height.

To get text wrapped inside a shape, one uses the 'shape-inside'
property. One can also use the 'shape-outside' property to exclude a
region. These properties need to be tweaked a bit from HTML/CSS to use
with SVG as SVG does not have floats.

The rewrite of the text section is far from done but I think it far
enough along that it would be good to get feedback from the group as to
the direction I have taken. Please have a look. The most important
sections to look at are Sections 10.1 and 10.7-10.10. Also one should
look a the index at the top to see the overall structure.

For the moment, this rewrite lives at:

http://tavmjong.free.fr/SVG/publish/text.html

Tav

Received on Thursday, 8 August 2013 15:38:19 UTC