mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
EPUB output: Handle <font size=+-> better
This commit is contained in:
parent
627f6be0ef
commit
93483213d6
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user