mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Check Book: Fix an error caused by empty style tags when auto-renaming mismatched font names. Fixes #1363028 [renaming incorrectly named fonts fails](https://bugs.launchpad.net/calibre/+bug/1363028)
This commit is contained in:
parent
5f81108d5c
commit
8f18290228
@ -74,7 +74,7 @@ class FontAliasing(BaseError):
|
||||
changed = True
|
||||
elif mt in OEB_DOCS:
|
||||
for style in container.parsed(name).xpath('//*[local-name()="style"]'):
|
||||
if style.get('type', 'text/css') == 'text/css':
|
||||
if style.get('type', 'text/css') == 'text/css' and style.text:
|
||||
sheet = container.parse_css(style.text)
|
||||
if fix_sheet(sheet, self.css_name, self.font_name):
|
||||
style.text = force_unicode(sheet.cssText, 'utf-8')
|
||||
|
Loading…
x
Reference in New Issue
Block a user