mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Fix an error when using the embed_all_fonts option with certain books
This commit is contained in:
parent
e517fbf89f
commit
77a40a22c3
@ -156,7 +156,7 @@ class EmbedFonts(object):
|
|||||||
manifest = self.oeb.manifest
|
manifest = self.oeb.manifest
|
||||||
id_, href = manifest.generate('page_css', 'page_styles.css')
|
id_, href = manifest.generate('page_css', 'page_styles.css')
|
||||||
self.page_sheet = manifest.add(id_, href, CSS_MIME, data=self.parser.parseString('', validate=False))
|
self.page_sheet = manifest.add(id_, href, CSS_MIME, data=self.parser.parseString('', validate=False))
|
||||||
head = self.current_item.xpath('//*[local-name()="head"][1]')
|
head = self.current_item.data.xpath('//*[local-name()="head"][1]')
|
||||||
if head:
|
if head:
|
||||||
href = self.current_item.relhref(href)
|
href = self.current_item.relhref(href)
|
||||||
l = etree.SubElement(head[0], XHTML('link'),
|
l = etree.SubElement(head[0], XHTML('link'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user