mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
EPUB Output: Use SVG for covers, to ensure cover image is correctly resized to fit available screen space
This commit is contained in:
parent
79396b00f4
commit
db50811cf5
@ -92,17 +92,20 @@ class EPUBOutput(OutputFormatPlugin):
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<meta name="calibre:cover" content="true" />
|
||||||
<title>Cover</title>
|
<title>Cover</title>
|
||||||
<style type="text/css" title="override_css">
|
<style type="text/css" title="override_css">
|
||||||
@page {padding: 0pt; margin:0pt}
|
@page {padding: 0pt; margin:0pt}
|
||||||
body { text-align: center; padding:0pt; margin: 0pt; }
|
body { text-align: center; padding:0pt; margin: 0pt; }
|
||||||
div { margin: 0pt; padding: 0pt; }
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||||
<img src="%s" alt="cover" style="height: 100%%" />
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
</div>
|
width="100%%" height="100%%" viewBox="0 0 600 800"
|
||||||
|
preserveAspectRatio="xMidYMid meet">
|
||||||
|
<image width="600" height="800" xlink:href="%s"/>
|
||||||
|
</svg>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user