Merge pull request #32106 from ruthra-kumar/allow_custom_fonts_in_wkhtmltopdf

fix: allow custom fonts in wkhtmltopdf
This commit is contained in:
ruthra kumar 2025-04-16 15:14:48 +05:30 committed by GitHub
commit 7d5e338e55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -621,7 +621,11 @@ def get_print_style(
def get_font(
print_settings: "PrintSettings", print_format: Optional["PrintFormat"] = None, for_legacy=False
) -> str:
default = "var(--font-stack)"
default = """
"InterVariable", "Inter", "saudiriyal", "-apple-system", "BlinkMacSystemFont",
"Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
"Helvetica Neue", sans-serif;
"""
if for_legacy:
return default