Reduced opacity on tspan ignored for rendering (rev >= 10326)

Bug #1480591 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

Highlighting a part of a text and reducing the opacity of the selection fails to render as expected with Inkscape's new cairo-based renderer. Converting the text to path (menu 'Path > Object to Path') uses the style property on the tspan as expected, as do the SVG renderers in Blink-based web browsers (Chromium, Opera), in Batik 1.7, 1.8, and librsvg 2.40.9 for the original text. Firefox 39 on the other hand seems to ignore the tspan's reduced opacity (like Inkscape >= 0.91).

Applying a reduced 'A' (alpha, or fill-opacity in SVG) on the other hand works as expected (with 0.48.5 as well as >= 0.91).

Steps to reproduce:
1) launch Inkscape (default (new) prefs, default new doc)
2) create a regular text object (e.g. with 3 words)
3) highlight the word in the middle, and reduce the opacity in 'Fill and Stroke' to 50%
4) duplicate the text, move it downwards and convert it to path (Shift+Ctrl+C)
5) save document
6) compare appearance in other SVG viewers

Expected result:
The original text, as well as the duplicate converted to path have the same appearance (at least wrt to color and opacity) on Inkscape's canvas as well as in other SVG viewers

Actual result:
In Inkscape (and in Firefox 39), the original text is rendered without taking the reduced opacity into account.

First noticed with Inkscape 0.91 r13725 on OS X 10.7.5.

Based on tests with archived builds:
- not reproduced with Inkscape 0.47, 0.48.5,
- not reproduced with Inkscape 0.48+devel r10325,
- reproduced with Inkscape 0.48+devel r10326,
- reproduced with Inkscape 0.91 r13725, 0.91+devel r14271;
this seems to be either an omission in the cairo renderer merged in r10326:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/changes/10326
or possibly a disagreement about the interpretation of the SVG 1.1 specification wrt styling of text elements via CSS properties on <tspan> elements.

Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP (32bit) with Inkscape trunk rev. 14274 and Firefox 39.
Not reproduced with Firefox 24, Chrome 44, and Opera 30.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

The text element's opacity attribute value (or the default one, if the attribute doesn't exist) overwrites the value specified in the tspan, but the fill-opacity attribute is not affected.

> possibly a disagreement about the interpretation of the SVG 1.1 specification wrt styling of text elements via CSS properties on <tspan> elements.

Apparently the presentation attributes (including opacity) are accepted for tspan elements (see http://www.w3.org/TR/SVG/text.html#TSpanElement), and I see no different on how opacity and fill-opacity should be interpreted with text and tspan elements.

jazzynico (jazzynico)
tags: added: svg
Changed in inkscape:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Nathan Lee (nathan.lee) wrote :

Closing as part of migration of bugs to GitLab (https://alpha.inkscape.org/bug-migration/). Issue is now tracked in https://gitlab.com/inkscape/inbox/-/issues/3778

Thanks for reporting!

Changed in inkscape:
status: Triaged → Invalid
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.