This commit is contained in:
Kovid Goyal 2007-05-24 17:17:33 +00:00
parent 73c09fbdbf
commit 23b87aa650
2 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@ You may have to adjust the GROUP and the location of the rules file to
suit your distribution.
"""
__version__ = "0.3.39"
__version__ = "0.3.40"
__docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"

View File

@ -163,18 +163,18 @@ class Cell(object):
ts = tb.textStyle.attrs
default_font = get_font(ts['fontfacename'], self.pts_to_pixels(ts['fontsize']))
parindent = self.pts_to_pixels(ts['parindent'])
ls, ws = self.pts_to_pixels(ts['baselineskip']), self.pts_to_pixels(ts['wordspace'])
ls, ws = self.pts_to_pixels(ts['baselineskip']) + self.pts_to_pixels(ts['linespace']), self.pts_to_pixels(ts['wordspace'])
top, bottom, left, right = 0, 0, parindent, parindent
def add_word(width, height, left, right, top, bottom):
if left + width > maxwidth:
left = width + ws
top += height + ls
bottom = top+height if top+height > bottom else bottom
top += ls
bottom = top+ls if top+ls > bottom else bottom
else:
left += (width + ws)
right = left if left > right else right
bottom = top+height if top+height > bottom else bottom
bottom = top+ls if top+ls > bottom else bottom
return left, right, top, bottom
for token, attrs in tokens(tb):