mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -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:
parent
807213d5d0
commit
8d693050a5
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user