Ignore line height of 1

This commit is contained in:
Kovid Goyal 2013-05-14 16:36:09 +05:30
parent d8a896616a
commit aa2aa3d2ef

View File

@ -271,7 +271,10 @@ class ParagraphStyle(object):
if val is not inherit:
c['margin-%s' % edge] = val
for x in ('text_indent', 'text_align', 'line_height', 'background_color'):
if self.line_height not in {inherit, '1'}:
c['line-height'] = self.line_height
for x in ('text_indent', 'text_align', 'background_color'):
val = getattr(self, x)
if val is not inherit:
c[x.replace('_', '-')] = val