From 73b14d988467b83eae8d477f305875d33e81f271 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 15 Mar 2008 20:43:28 +0000 Subject: [PATCH] Make relative line height handling similar to em font size handling --- src/libprs500/ebooks/lrf/html/convert_from.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libprs500/ebooks/lrf/html/convert_from.py b/src/libprs500/ebooks/lrf/html/convert_from.py index 38c097391e..b5426ba5df 100644 --- a/src/libprs500/ebooks/lrf/html/convert_from.py +++ b/src/libprs500/ebooks/lrf/html/convert_from.py @@ -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 @@ -1331,7 +1331,7 @@ class HTMLConverter(object): if properties_different(self.current_block.blockStyle.attrs, block_properties) or \ properties_different(self.current_block.textStyle.attrs, text_properties) or\ align != self.current_block.textStyle.attrs['align']: - ts = self.current_block.textStyle.copy() + ts = self.current_block.textStyle.copy() ts.attrs.update(text_properties) ts.attrs['align'] = align bs = self.current_block.blockStyle.copy()