mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Browser viewer: Restore the default font as sans-serif
But it can now be easily overriden by either user-stylesheet or book style sheet
This commit is contained in:
parent
8561f82898
commit
d49fab5ace
@ -198,6 +198,7 @@ class PopupIframeBoss:
|
||||
self.frag = data.frag
|
||||
for name in self.blob_url_map:
|
||||
window.URL.revokeObjectURL(self.blob_url_map[name])
|
||||
document.body.style.removeProperty('font-family')
|
||||
root_data, self.mathjax, self.blob_url_map = finalize_resources(self.book, data.name, data.resource_data)
|
||||
self.resource_urls = unserialize_html(root_data, self.content_loaded, self.show_only_footnote)
|
||||
update_settings(data.settings)
|
||||
|
@ -2,9 +2,11 @@
|
||||
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
from __python__ import hash_literals
|
||||
|
||||
from dom import clear
|
||||
from elementmaker import E
|
||||
from encodings import base64decode, utf8_decode
|
||||
|
||||
from dom import clear
|
||||
|
||||
JSON_XHTML_MIMETYPE = 'application/calibre+xhtml+json'
|
||||
|
||||
def decode_component(x):
|
||||
@ -228,6 +230,7 @@ def unserialize_html(serialized_data, proceed, postprocess_dom):
|
||||
apply_attributes(html, document.documentElement, ns_map)
|
||||
head, body = tree[1], tree[2] # noqa: unused-local
|
||||
clear(document.head, document.body)
|
||||
document.head.appendChild(E.style('html { font-family: sans-serif }'))
|
||||
resource_urls = {}
|
||||
load_required = set()
|
||||
proceeded = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user