Re: [css-shapes] shape-inside in level 2

Hi Alan,

Thanks for the inquiry. Sorry to have taken so long to reply. I didn't
have a quick response.

On Wed, 2014-01-08 at 22:04 +0000, Alan Stearns wrote:
> Tav,
> 
> In today’s CSSWG meeting, we discussed the work you started in Inkscape on
> flowing text into an arbitrary shape, and how that is or is not impacted
> by our postponing shape-inside to level 2 of CSS Shapes.

I haven't actually started working on redoing Inkscape's flowed text
(which is currently based on SVG 1.2 <flowRoot>, etc. I do plan on
getting started soon.

On the other hand, I have done work on CSS based text layout in SVG 2.
The current editor's draft refers to shape-inside:

https://svgwg.org/svg2-draft/text.html#TextShapeInside

You can see examples of its use there.

> I know we had an in-person conversation about this, but the only
> written-down reference I could find was from a blog post of yours where I
> commented:
> 
> http://tavmjong.free.fr/blog/?p=938


> My position there (and now) was that there shouldn’t be an issue with
> working on shape-inside, because we intend to spec it out in CSS Shapes
> level 2. We’ve been contributing shape-inside code to WebKit and Blink
> alongside our level 1 work. I just think that we can make faster progress
> by finishing what’s in level 1 (particularly with a second implementation
> and a test suite) then working on the next level.

Great to hear that work is actually being done on 'shape-inside'.

> Does this work for you, or would you like to argue for pulling
> shape-inside back into level 1?

Of course I would love to see shape-inside back in level 1, but
truthfully, it isn't of much use to us without the corresponding ability
to refer to an SVG shape. Recall that SVG doesn't utilize the box model.

As the shape module has progressed it seems to me, perhaps naively, to
be moving away from being easy to use with SVG. For example, the Example
14 in the SVG editor's draft used shape-inside="rectange(50,10,200,80)
but rectangle is no longer in Shapes 1.

The reference boxes currently in the shapes module are not useful to
SVG. It may be possible in the future to do something like this:

<rect x="100" y="100" width="200" height="100">
  <text shape-inside="xx-box">Some text</text>
</rect>

In this case, the <text> element could be placed relative to the
bounding box of the rectangle. For SVG, we would need to be able to
specify if one should use the "geometric" bounding box (without stroke)
or the "visual" bounding box (with stroke and/or markers). But
currently, one can not insert one graphical element inside another. At
the moment, the best one can do is use the current viewport (which
should be the default reference box for SVG).

I just noticed that the problem of reference box in respect to
masking/clipping has been added to the list of topics to be taken up at
a future SVG WG call.

Tav

Received on Tuesday, 14 January 2014 14:31:17 UTC