From 93483213d6f0e836f966e96b6ee2ad586345a4d4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 25 Dec 2008 20:18:09 -0800 Subject: [PATCH] EPUB output: Handle better --- src/calibre/ebooks/html.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/html.py b/src/calibre/ebooks/html.py index 7af13f21c0..03a0f7cbda 100644 --- a/src/calibre/ebooks/html.py +++ b/src/calibre/ebooks/html.py @@ -766,6 +766,8 @@ class Processor(Parser): size = int(font.attrib.pop('size', '3')) except: 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) face = font.attrib.pop('face', None) if face is not None: