Make relative line height handling similar to em font size handling

This commit is contained in:
Kovid Goyal 2008-03-15 20:43:28 +00:00
parent a68ed12218
commit 73b14d9884

View File

@ -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