Updated font import to work with Weasyprint >= 53.0

This commit is contained in:
MrHeadwar 2022-08-25 17:22:20 +02:00 committed by Alexandre Prokoudine
parent 5de29fadbb
commit 46ccd64a62

View File

@ -719,7 +719,7 @@ if pdf:
# Generating the actual PDF with weasyprint (https://weasyprint.org/) # Generating the actual PDF with weasyprint (https://weasyprint.org/)
from weasyprint import HTML from weasyprint import HTML
from weasyprint.fonts import FontConfiguration from weasyprint.text.fonts import FontConfiguration
html_font_config = FontConfiguration() html_font_config = FontConfiguration()
doc = HTML(string = pdfpage, base_url = global_site_dir) doc = HTML(string = pdfpage, base_url = global_site_dir)