You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SVG plot missing lines when rendered in Apple Preview, and Apple Safari but renders correctly in Typst Preview and Adobe Acrobat. #5509
I have an SVG line plot created with matplotlib that renders fine in the typst preview. The lone SVG file (Not in a PDF) also renders correctly in Safari, Chrome, and Firefox. But when I export a PDF containing this SVG file and try to view it with Apple Safari or Apple Preview the lines in the plot do not show up. This does not occur with Adobe Acrobat. This issue also persists when enabling PDF/A.
Edit: I almost certain this has something todo with clip paths because I was able to use Claude to convert the clip paths in the SVG into normal paths and that fixed it.
I detected the exact source of the problem: the mask attribute.
When I remove this attribute (which is on all the path elements of my SVG), the pdf now displays properly in PDFs. So, yes inasmuch as clipping and masking are related, this problem seems to share the same DNA
Activity
LaurenzV commentedon Dec 3, 2024
Probably similar to #4901 (comment).
LaurenzV commentedon Dec 3, 2024
Would be fixed by #5420.
reverendpaco commentedon Mar 8, 2025
x.pdf

Relevant reproduction of this issue. PDF shows properly outside of Preview but missing path from within Preview. SVG generated from D2.
Only reason I'm piling on here is that this SVG does not use clip-paths. I understand this may be a bug with Apple.
Using Typst 0.13.1
reverendpaco commentedon Mar 8, 2025
Update:
I detected the exact source of the problem: the
maskattribute.When I remove this attribute (which is on all the path elements of my SVG), the pdf now displays properly in PDFs. So, yes inasmuch as clipping and masking are related, this problem seems to share the same DNA
LaurenzV commentedon Mar 8, 2025
Yep, the root cause are masks.