mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PDF Output: Dont error out on files that have invalid font-family declarations. Fixes #1096279 (AttributeError: 'int' object has no attribute 'replace')
This commit is contained in:
parent
0b3282f108
commit
2db79a12e4
@ -190,7 +190,10 @@ class PDFOutput(OutputFormatPlugin):
|
|||||||
if ff is None: continue
|
if ff is None: continue
|
||||||
val = ff.propertyValue
|
val = ff.propertyValue
|
||||||
for i in xrange(val.length):
|
for i in xrange(val.length):
|
||||||
|
try:
|
||||||
k = icu_lower(val[i].value)
|
k = icu_lower(val[i].value)
|
||||||
|
except (AttributeError, TypeError):
|
||||||
|
val[i].value = k = 'times'
|
||||||
if k in family_map:
|
if k in family_map:
|
||||||
val[i].value = family_map[k]
|
val[i].value = family_map[k]
|
||||||
if iswindows:
|
if iswindows:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user