Kozea / WeasyPrint

The awesome document factory
https://weasyprint.org
BSD 3-Clause "New" or "Revised" License
7.14k stars 681 forks source link

support for svg mix-blend-mode: multiply #1376

Open danfitz36 opened 3 years ago

danfitz36 commented 3 years ago

it's now supported in chrome, but it's new. any chance it can be supported here?

chrome: multiplied in chrome pdf: not in pdf

liZe commented 3 years ago

Hello!

Thank you for this feature request. As many blend modes are supported in PDF (including multiply), we can imagine that this feature could be implemented. Of course, having the feature in PDF doesn’t mean that it’s easy to implement :smile:, but at least it’s a good start!

danfitz36 commented 3 years ago

I'm mostly a designer who codes some. is there anything else I can do to be helpful on something like this?

liZe commented 3 years ago

I'm mostly a designer who codes some. is there anything else I can do to be helpful on something like this?

Thanks a lot for your help!

The first steps are not really fun and require some ability to focus on a specification, but that where I’d start:

TL;DR: find a PDF sample in the spec where the Multiply (or any other) blend mode is set, try it in WeasyPrint’s code. If it works, make WeasyPrint use the real mix-blend-mode value instead of forcing Multiply. The first step could be complicated, but doesn’t require any coding abilities.

liZe commented 3 years ago

Note that SVG’s feBlend is supported. Having mix-blend-mode supported in SVG (and actually even in CSS) could actually be quite easy. If anyone is interested in contributing, just ask, we’ll help you!