diff --git a/src/pyj/read_book/footnotes.pyj b/src/pyj/read_book/footnotes.pyj index 8726c8d51c..6d5c726cb3 100644 --- a/src/pyj/read_book/footnotes.pyj +++ b/src/pyj/read_book/footnotes.pyj @@ -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) diff --git a/src/pyj/read_book/resources.pyj b/src/pyj/read_book/resources.pyj index f38fde2098..d17e7512a7 100644 --- a/src/pyj/read_book/resources.pyj +++ b/src/pyj/read_book/resources.pyj @@ -2,9 +2,11 @@ # License: GPL v3 Copyright: 2016, Kovid Goyal 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