Text content element rendering does not respect fill-rule property

Bug #595355 reported by Stuart P. Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Low
Unassigned

Bug Description

When rendering a Text object with a font glyph that overlaps itself (such as the plus character in Team Fortress 2's "TF2 Build" font), Inkscape will always render the self-overlapping characters with the 'evenodd' fill rule, regardless of the text content element's fill-rule property (whose initial value is specified in http://www.w3.org/TR/SVG11/painting.html#FillRuleProperty as 'nonzero'). Only if the text object is converted to a shape using Object To Path will Inkscape correctly respect the fill-rule attribute.

This behavior is observed on Windows 7 x64, Inkscape 0.47pre4.

Tags: fonts svg
su_v (suv-lp)
tags: added: fonts
Revision history for this message
su_v (suv-lp) wrote :

reproduced with Inkscape 0.47 and 0.47+devel r9503 on OS X 10.5.8

using the font 'TF2 Build' from <http://www.dafont.com/tf2-build.font>

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

Possibly an error in the 'TF2 Build' font file, because the related font 'TF2' doesn't expose this type of rendering error for '+'.

Revision history for this message
su_v (suv-lp) wrote :

Same error in 'TF2' for '&' - this time 'TF2 Build' is rendered correctly, both as font and as path.

The random occurrence IMHO indicates that this is mainly an error in the font file (path is self-intersecting instead of outlining the character), not in Inkscape.

Revision history for this message
Stuart P. Bentley (stuart) wrote :

Self-intersection is not an error, though. It's a valid scenario whose behavior is controlled on the Fill tab. However, while path objects respect this setting, Text objects do not, and that is the bug.

Revision history for this message
su_v (suv-lp) wrote :

Other SVG renderers (tested with Squiggle (Batik 1.7), Safari 4.0.5 and Firefox 3.5.9 on OS X 10.5.8) ignore the fill-rule for text objects as well, but they default to 'non-zero' whereas Inkscape seems to always use 'even-odd' for text objects.

View the attached file in different SVG viewers and Inkscape: the fill-rule of the text objects is ignored by all, but Inkscape seems to be the only one to use 'even-odd' instead of 'non-zero'.

I have not yet found specifics about using the style attribute 'fill-rule' for text in the SVG specification.

Revision history for this message
Stuart P. Bentley (stuart) wrote :

http://www.w3.org/TR/SVG11/painting.html#FillRuleProperty lists "text content elements" in its "Applies to" section, just as it applies to shapes.

description: updated
tags: added: svg
description: updated
summary: - Text object rendering does not respect Fill overlap setting
+ Text content element rendering does not respect fill-rule property
description: updated
Revision history for this message
su_v (suv-lp) wrote :

Linking as duplicate to
Bug #168601 “Overlapping glyph parts don't get filled”
<https://bugs.launchpad.net/inkscape/+bug/168601>

Please add a comment here and revert the duplicate status if you don't agree and think these are different issues.

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.