Bug 155651 - Add SVG 2 attribute values "context-stroke" and "context-fill"
Summary: Add SVG 2 attribute values "context-stroke" and "context-fill"
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha1+
Hardware: All All
: medium enhancement
Assignee: Xisco Faulí
URL: https://www.w3.org/TR/SVG2/painting.html
Whiteboard: target:24.8.0 target:24.2.4 inRelease...
Keywords: filter:svg
: 160832 (view as bug list)
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2023-06-02 18:06 UTC by Richard Mortimer
Modified: 2024-07-12 15:24 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Writer document with the SVGs and their equivalent PDFs imported (126.58 KB, application/vnd.oasis.opendocument.text)
2023-06-02 18:06 UTC, Richard Mortimer
Details
PDF of writer document with sample SVG/PDFs imported (45.44 KB, application/pdf)
2023-06-02 18:07 UTC, Richard Mortimer
Details
Inkscape 1.2 arrows SVG (6.57 KB, image/svg+xml)
2023-06-02 18:08 UTC, Richard Mortimer
Details
Inkscape 1.2 arrows PDF (3.10 KB, application/pdf)
2023-06-02 18:08 UTC, Richard Mortimer
Details
Inkscape 1.1.2 arrows SVG (6.37 KB, image/svg+xml)
2023-06-02 18:09 UTC, Richard Mortimer
Details
Inkscape 1.1.2 arrows PDF (2.91 KB, application/pdf)
2023-06-02 18:09 UTC, Richard Mortimer
Details
Inkscape 1.0.2 arrows SVG (7.30 KB, image/svg+xml)
2023-06-02 18:10 UTC, Richard Mortimer
Details
Inkscape 1.0.2 arrows PDF (3.08 KB, application/pdf)
2023-06-02 18:10 UTC, Richard Mortimer
Details
Inkscape 0.92 arrows SVG (8.08 KB, image/svg+xml)
2023-06-02 18:10 UTC, Richard Mortimer
Details
Inkscape 0.92 arrows PDF (4.28 KB, application/pdf)
2023-06-02 18:11 UTC, Richard Mortimer
Details
Screnshot from Chromium (78.05 KB, image/png)
2023-06-03 17:12 UTC, Rainer Bielefeld Retired
Details
sample file (567 bytes, image/svg+xml)
2024-04-30 13:25 UTC, Xisco Faulí
Details
context-fill sample (363 bytes, image/svg+xml)
2024-05-06 14:46 UTC, Xisco Faulí
Details
tdf#155651 SVG 2 attribute values 'context-stroke' and 'context-fill' LO7.6.5 vs LO24.2.4.png (360.94 KB, image/png)
2024-06-07 14:35 UTC, Piotr Osada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Mortimer 2023-06-02 18:06:52 UTC
Created attachment 187670 [details]
Writer document with the SVGs and their equivalent PDFs imported

The SVG images produced by recent (version 1.2 onwards) versions of Inkscape do not display arrows correctly, if at all. Earlier versions of Inkscape (0.92, 1.0.x and 1.1.x) import correctly.

The SVG images produced by Inkscape display correctly in Firefox and Chrome so it seems that it is Libreoffice that is not importing/displaying correctly.

Tested in Libreoffice 7.2.7.2, 7.5.3.2 and 7.6.0.0 alpha1 (1/June/2023) with the same results.

I can export the SVGs from Inkscape as PDF and the imported PDF documents display correctly. Attached to the bug are example SVGs generated with different versions of Inkscape and PDF exports from that version of Inkscape. Also a writer document with all of the SVGs and PDFs imported to show the issue.
Comment 1 Richard Mortimer 2023-06-02 18:07:55 UTC
Created attachment 187671 [details]
PDF of writer document with sample SVG/PDFs imported
Comment 2 Richard Mortimer 2023-06-02 18:08:21 UTC
Created attachment 187672 [details]
Inkscape 1.2 arrows SVG
Comment 3 Richard Mortimer 2023-06-02 18:08:48 UTC
Created attachment 187673 [details]
Inkscape 1.2 arrows PDF
Comment 4 Richard Mortimer 2023-06-02 18:09:16 UTC
Created attachment 187674 [details]
Inkscape 1.1.2 arrows SVG
Comment 5 Richard Mortimer 2023-06-02 18:09:38 UTC
Created attachment 187675 [details]
Inkscape 1.1.2 arrows PDF
Comment 6 Richard Mortimer 2023-06-02 18:10:00 UTC
Created attachment 187676 [details]
Inkscape 1.0.2 arrows SVG
Comment 7 Richard Mortimer 2023-06-02 18:10:25 UTC
Created attachment 187677 [details]
Inkscape 1.0.2 arrows PDF
Comment 8 Richard Mortimer 2023-06-02 18:10:49 UTC
Created attachment 187678 [details]
Inkscape 0.92 arrows SVG
Comment 9 Richard Mortimer 2023-06-02 18:11:10 UTC
Created attachment 187679 [details]
Inkscape 0.92 arrows PDF
Comment 10 Rainer Bielefeld Retired 2023-06-03 16:59:53 UTC
> The SVG images produced by Inkscape display correctly in Firefox and Chrome 

Not in Chromium Version 97.0.4692.7
Not in FF 115.0a1 (2023-06-03) (64-Bit)

We need some proof that the .SVG have correct syntax
Comment 11 Rainer Bielefeld Retired 2023-06-03 17:12:59 UTC
Created attachment 187699 [details]
Screnshot from Chromium

Also Chromium Version 116.0.5810.0 (Entwickler-Build) (64-Bit) shows SVG different from PDF exported from Inkscape.
Comment 12 Regina Henschel 2023-06-03 19:53:40 UTC
Problem is the value fill:context-stroke in the style attribute of the marker. The attribute value "context-stroke" does not belong to SVG 1.1. It is only in the working draft for SVG 2. LibreOffice does not support this value.
Comment 13 Roman Kuznetsov 2023-06-04 18:06:31 UTC
Set to NEW by Comment 12

Thanks Regina
Comment 14 Regina Henschel 2023-06-07 13:45:43 UTC
Same for attribute 'context-fill'.
Comment 15 Xisco Faulí 2024-04-30 11:30:31 UTC
*** Bug 160832 has been marked as a duplicate of this bug. ***
Comment 16 Xisco Faulí 2024-04-30 13:25:29 UTC
Created attachment 193907 [details]
sample file
Comment 17 Commit Notification 2024-05-03 09:51:14 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d75a37a5829dfcb915f7190d4453c4d4fa25e579

tdf#155651: Add support for "context-stroke"

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2024-05-03 16:27:30 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/f4a868ce3b7e5fe6e708f2c795402d646e0746d5

tdf#155651: Add support for "context-stroke"

It will be available in 24.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Xisco Faulí 2024-05-06 14:46:57 UTC
Created attachment 194004 [details]
context-fill sample
Comment 20 Commit Notification 2024-05-06 20:02:23 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3b0f96a0773f19f7d5bdb5725ff9667eb4809215

tdf#155651: Add support for "context-fill"

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2024-05-18 20:30:25 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/e9cec488461b1610091f43b4a837e2338fd1cf91

tdf#155651: Add support for "context-fill"

It will be available in 24.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Stéphane Guillou (stragu) 2024-05-20 03:05:08 UTC
Thanks Richard, Regina and Xisco!

Verified in:

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5e23cac5767c164b93491d46deef039409ea286c
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Added to 24.2 release notes:

https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F24.2&type=revision&diff=751489&oldid=750269
Comment 23 Richard Mortimer 2024-05-21 15:22:15 UTC
Thank you all.

I have tested my original documents and can confirm that the arrows now show.

Version: 24.8.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: a17e39caaf73108bee692d6f64a44c62f4066f1d
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-US
Calc: threaded
Comment 24 Piotr Osada 2024-06-07 14:35:57 UTC
Created attachment 194595 [details]
tdf#155651 SVG 2 attribute values 'context-stroke' and 'context-fill' LO7.6.5 vs LO24.2.4.png

Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: threaded

Confirm: it's fixed now.