Closed luoyu-123 closed 3 years ago
Looks to me like you're missing a font pack.
https://docs.microsoft.com/en-us/typography/font-list/fangsong
Try installing that font pack, see if it works.
I think this issue should be renamed "Unable to find a suitable font"
I guess this is more of a usage issue, not really actionable.
Is there a way to suppress these errors?
This should do it on the command-line:
python -W ignore::SomeWarningCategory script.py
python -W ignore::Warning script.py # supress all warnings
and in code:
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=SomeWarningCategory)
# Code that generates the warning
How to solve the problem of reporting an error while reading the svg and creating a drawing object
code: from svglib.svglib import svg2rlg
from reportlab.graphics import renderPDF
drawing = svg2rlg("test.svg") print(drawing)
renderPDF.drawToFile(dr
awing, "22.pdf")
file: test.zip