mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Use the font family from the theme instead of hard coding it to sans-serif
This commit is contained in:
parent
2f08ebb35a
commit
35d4f21b98
@ -19,10 +19,11 @@ LOADING_DOC = '''
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<script type="text/javascript" id="bootstrap">
|
||||
window.iframe_type = '__IFRAME_TYPE__'; // different in different iframes
|
||||
window.default_font_family = '__FONT__'; // from the theme
|
||||
__SCRIPT__
|
||||
end_script
|
||||
</head>
|
||||
<body style="font-family: __FONT__">
|
||||
<body>
|
||||
<div style="font-size:larger; font-weight: bold; margin-top:48vh; text-align:center">
|
||||
__BS__
|
||||
</div>
|
||||
|
@ -231,7 +231,7 @@ def unserialize_html(serialized_data, proceed, postprocess_dom):
|
||||
head, body = tree[1], tree[2] # noqa: unused-local
|
||||
clear(document.head, document.body)
|
||||
# Default stylesheet
|
||||
document.head.appendChild(E.style('html { font-family: sans-serif }'))
|
||||
document.head.appendChild(E.style(type='text/css', 'html {{ font-family: {} }}'.format(window.default_font_family or "sans-serif")))
|
||||
resource_urls = {}
|
||||
load_required = set()
|
||||
proceeded = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user