Fix #1480 (USA Today News feed fails every time when downloading to EPUB, Ars and CNN LRF reset PRS-505)

This commit is contained in:
Kovid Goyal 2008-12-28 10:07:05 -08:00
parent e95bbf5ec2
commit b082e9ac87

View File

@ -771,9 +771,9 @@ class Processor(Parser):
class_counter = 0
for font in self.root.xpath('//font'):
try:
size = int(font.attrib.pop('size', '3'))
size = font.attrib.pop('size', '3')
except:
size = 3
size = '3'
if size and size.strip() and size.strip()[0] in ('+', '-'):
size = 3 + float(size) # Hack assumes basefont=3
setting = 'font-size: %d%%;'%int((float(size)/3) * 100)