Improved font in http.webpage.simplify for HTML and PDF output

This commit is contained in:
Fabio Manganiello 2019-10-05 22:48:07 +02:00
parent 09991b2e8a
commit 89c2555753

View file

@ -77,9 +77,22 @@ class HttpWebpagePlugin(Plugin):
'content': content, 'content': content,
} }
content = '<body style="{body_style}"><h1>{title}</h1>{content}</body>'. \ content = '''<html>
format(title=title, content=content, <head>
body_style='font-size: 22px; font-family: Tahoma, Geneva, Verdana, Helvetica, sans-serif') <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather" />
<title>{title}</title>
<style>
body {{
font-size: 22px;
font-family: 'Merriweather', Georgia, 'Times New Roman', Times, serif;
}}
</style>
</head>
<body>
<h1>{title}</h1>
{content}
</body>
</html>'''.format(title=title, content=content)
outfile = os.path.abspath(os.path.expanduser(outfile)) outfile = os.path.abspath(os.path.expanduser(outfile))