mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Make relative line height handling similar to em font size handling
This commit is contained in:
parent
a68ed12218
commit
73b14d9884
@ -1286,8 +1286,8 @@ class HTMLConverter(object):
|
||||
fp['parindent'] = indent
|
||||
|
||||
if tag_css.has_key('line-height'):
|
||||
bls, ls = int(self.current_block.textStyle.attrs['baselineskip']), \
|
||||
int(self.current_block.textStyle.attrs['linespace'])
|
||||
bls, ls = int(self.book.defaultTextStyle.attrs['baselineskip']), \
|
||||
int(self.book.defaultTextStyle.attrs['linespace'])
|
||||
try: # See if line-height is a unitless number
|
||||
val = int(float(tag_css['line-height'].strip()) * (bls+ls))
|
||||
fp['linespace'] = val
|
||||
|
Loading…
x
Reference in New Issue
Block a user