EPUB output: Handle <font size=+-> better

This commit is contained in:
Kovid Goyal 2008-12-25 20:18:09 -08:00
parent 627f6be0ef
commit 93483213d6

View File

@ -766,6 +766,8 @@ class Processor(Parser):
size = int(font.attrib.pop('size', '3')) size = int(font.attrib.pop('size', '3'))
except: 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) setting = 'font-size: %d%%;'%int((float(size)/3) * 100)
face = font.attrib.pop('face', None) face = font.attrib.pop('face', None)
if face is not None: if face is not None: