mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-06-04 21:15:24 -04:00
Conversion: Handle invalid font-family when subsetting
Conversion: Fix font declarations with invalid font-family values causing conversion to abort when subsetting is enabled.
This commit is contained in:
@@ -27,7 +27,7 @@ def get_font_properties(rule, default=None):
|
||||
val = s.getProperty(q).propertyValue[0]
|
||||
val = getattr(val, g)
|
||||
if q == 'font-family':
|
||||
val = [x.value for x in s.getProperty(q).propertyValue]
|
||||
val = [x.value for x in s.getProperty(q).propertyValue if hasattr(x.value, 'lower')]
|
||||
if val and val[0] == 'inherit':
|
||||
val = None
|
||||
except (IndexError, KeyError, AttributeError, TypeError, ValueError):
|
||||
|
||||
Reference in New Issue
Block a user