Open febdoctor opened 1 month ago
Replacing the "font" CSS property by specific properties like "font-size" and "font-family" works. This can be used as a workaround.
Hi, and thanks for the report!
This missing feature is caused by the dirty code used for SVG attributes management. We should use the real validated and computed values of SVG attributes and take care of font
here:
The font properties set via a 'font' CSS shorthand property seem to be totally ignored when rendering text elements inside SVG images.
Here is a minimal SVG to reproduce the issue:
It renders well in the PDF from Firefox:
But Weasyprint uses default font family and size:
font1-firefox.svg.pdf font1-weasyprint.svg.pdf