mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -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">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<script type="text/javascript" id="bootstrap">
|
<script type="text/javascript" id="bootstrap">
|
||||||
window.iframe_type = '__IFRAME_TYPE__'; // different in different iframes
|
window.iframe_type = '__IFRAME_TYPE__'; // different in different iframes
|
||||||
|
window.default_font_family = '__FONT__'; // from the theme
|
||||||
__SCRIPT__
|
__SCRIPT__
|
||||||
end_script
|
end_script
|
||||||
</head>
|
</head>
|
||||||
<body style="font-family: __FONT__">
|
<body>
|
||||||
<div style="font-size:larger; font-weight: bold; margin-top:48vh; text-align:center">
|
<div style="font-size:larger; font-weight: bold; margin-top:48vh; text-align:center">
|
||||||
__BS__
|
__BS__
|
||||||
</div>
|
</div>
|
||||||
|
@ -231,7 +231,7 @@ def unserialize_html(serialized_data, proceed, postprocess_dom):
|
|||||||
head, body = tree[1], tree[2] # noqa: unused-local
|
head, body = tree[1], tree[2] # noqa: unused-local
|
||||||
clear(document.head, document.body)
|
clear(document.head, document.body)
|
||||||
# Default stylesheet
|
# 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 = {}
|
resource_urls = {}
|
||||||
load_required = set()
|
load_required = set()
|
||||||
proceeded = False
|
proceeded = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user