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
1 changed files with 16 additions and 3 deletions

View File

@ -77,9 +77,22 @@ class HttpWebpagePlugin(Plugin):
'content': content,
}
content = '<body style="{body_style}"><h1>{title}</h1>{content}</body>'. \
format(title=title, content=content,
body_style='font-size: 22px; font-family: Tahoma, Geneva, Verdana, Helvetica, sans-serif')
content = '''<html>
<head>
<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))