mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -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
|
fp['parindent'] = indent
|
||||||
|
|
||||||
if tag_css.has_key('line-height'):
|
if tag_css.has_key('line-height'):
|
||||||
bls, ls = int(self.current_block.textStyle.attrs['baselineskip']), \
|
bls, ls = int(self.book.defaultTextStyle.attrs['baselineskip']), \
|
||||||
int(self.current_block.textStyle.attrs['linespace'])
|
int(self.book.defaultTextStyle.attrs['linespace'])
|
||||||
try: # See if line-height is a unitless number
|
try: # See if line-height is a unitless number
|
||||||
val = int(float(tag_css['line-height'].strip()) * (bls+ls))
|
val = int(float(tag_css['line-height'].strip()) * (bls+ls))
|
||||||
fp['linespace'] = val
|
fp['linespace'] = val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user