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: