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:
Kovid Goyal 2013-01-05 09:30:34 +05:30
parent 0b3282f108
commit 2db79a12e4

View File

@ -190,7 +190,10 @@ class PDFOutput(OutputFormatPlugin):
if ff is None: continue
val = ff.propertyValue
for i in xrange(val.length):
try:
k = icu_lower(val[i].value)
except (AttributeError, TypeError):
val[i].value = k = 'times'
if k in family_map:
val[i].value = family_map[k]
if iswindows: