Issues with text-shadow in SVG text (fill vs stroke)
Categories
(Core :: SVG, defect)
Tracking
()
People
(Reporter: longsonr, Assigned: longsonr)
References
Details
Attachments
(5 files)
See testcase: the SVG text renders with colored stroke and fill, as specified in the attributes of the <svg> element, and inherits its font family/weight/size from the body.
-
The shadow is always filled even if the text is not filled.
-
The shadow does not respect stroke at all.
-
What should happen if the text has opacity? What if there is fill-opacity and stroke-opacity, should they be observed in the shadow? What if the fill and stroke opacity are different?
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
Comment 2•2 years ago
|
||
I notice that these issues aren't actually limited to SVG text; similar considerations apply to HTML text with shadows in combination with -webkit-text-stroke. Example: https://codepen.io/jfkthame/pen/LYJYRPd
So this may be a more general nsTextFrame painting issue.
Comment 3•2 years ago
|
||
I've filed https://github.com/w3c/csswg-drafts/issues/8449 regarding the spec for text-shadow; this is primarily discussing HTML text, but we probably want to consider both the SVG and HTML behaviors together, as it's pretty weird for authors if text-shadow behaves quite differently in the two contexts.
| Assignee | ||
Comment 4•2 years ago
|
||
Also, should the text decoration be shadowed too?
Comment 5•2 years ago
|
||
The CSS text-decoration spec for text-shadow says that:
Each layer shadows the element’s text and all its text decorations (composited together).
So yes, decorations get shadowed. (I think we do that already, don't we?)
Comment 6•2 years ago
|
||
Marking as S3 for now, we may want to re-evaluate this once the CSSWG takes a look at the spec issue and we have confirmation of the expected results.
| Assignee | ||
Comment 7•1 year ago
|
||
| Assignee | ||
Comment 8•1 year ago
|
||
| Assignee | ||
Comment 9•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 10•1 year ago
|
||
Depends on D200435
| Assignee | ||
Comment 11•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 12•1 year ago
|
||
Comment 13•1 year ago
|
||
Comment 15•1 year ago
•
|
||
Backed out for causing linux related wr failures in SVGTextFrame.cpp.
- Backout link
- Push with failures
- Failure Log
- Failure line: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /builds/worker/checkouts/gecko/layout/svg/SVGTextFrame.cpp:2666:7 in
L.E. there are also some OS X mochitests-plain failures that are related to this.
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | dom/svg/test/test_bug1426594.html | undefined assertion name - got 69.10000610351562, expected 63.100006103515625 epsilon: +/- 5
| Assignee | ||
Comment 17•1 year ago
|
||
Comment 18•1 year ago
|
||
Comment 19•1 year ago
|
||
Backed out for causing OS X mochitests-plain failures in test_bug1426594.html.
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | dom/svg/test/test_bug1426594.html | undefined assertion name - got 69.10000610351562, expected 63.100006103515625 epsilon: +/- 5
Comment 21•1 year ago
|
||
| Assignee | ||
Updated•1 year ago
|
Comment 22•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f637c422003f
https://hg.mozilla.org/mozilla-central/rev/27783bb8f6b7
Updated•1 year ago
|
Updated•1 year ago
|
Description
•