Flow text doesn't work right with fill-rule:evenodd

Bug #166843 reported by Josh Lee
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Richard Hughes

Bug Description

1. Combine a large circle and a small circle to make a
donut.
2. Flow a text object into this path.
3. Notice how the text flows in the hole of the donut.

Read section 4.13.1 of this draft[1] of CSS1.2. It says
that flow text should not appear in excluded regions.
Additionally, this image[2] shows flow text the way I
would expect.

(Hmm. Maybe this behavior could be controlled with the
'fill-rule' property? I'm no CSS expert.)

[1] http://www.w3.org/TR/2004/WD-SVG12-20041027/
flow.html
[2] http://www.w3.org/TR/2004/WD-SVG12-20041027/
images/goflow.png

Revision history for this message
Richard Hughes (cyreve) wrote :

Works for me, and in fact goflow ships with Inkscape, as
share/examples/flow-go.svg. Can you attach a file for which it
doesn't work?

Revision history for this message
Josh Lee (jleedev) wrote :

Interesting. I fonud flow-go.svg and it renders properly for
me, too. However, if I make a flowed text like in my
original report, it doesn't work properly.

Details (Debian sid):
~$ dpkg -l inkscape
ii inkscape 0.42-1
~$ inkscape --version
Inkscape 0.42 (Aug 5 2005)

Revision history for this message
Josh Lee (jleedev) wrote :

I'm attaching a png version.

Revision history for this message
Richard Hughes (cyreve) wrote :

The problem is that the text code doesn't support evenodd fill
rules. If you break the path, reverse one of the subpaths, then
recombine them, the desired effect will be achieved.

Revision history for this message
Richard Hughes (cyreve) wrote :

Properly fixed in cvs

Revision history for this message
Josh Lee (jleedev) wrote :

Wonderful. So now the text will go wherever the fill goes?

(Just curious, what exactly happens when I reverse one of
the subpaths? It's like the path doesn't even have an interior.)

Revision history for this message
Richard Hughes (cyreve) wrote :

Yes, the text does the same as the fill now. If you have a CVS
build, try flipping between the evenodd and nonzero buttons
on the fill tab of fill&stroke.

The explanation of fill-rule in the SVG spec at http://www.w3.
org/TR/SVG11/painting.html#FillRuleProperty is quite good.
You can make your sample file in Inkscape look like those in
the spec simply by adding some Mid Markers in the Stroke
Style tab of fill&stroke

Revision history for this message
Josh Lee (jleedev) wrote :

Awesome, thanks.

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.