Adjust baselineskip on font-delta. Use baselineskip rather than linespace in table code.

This commit is contained in:
Kovid Goyal 2007-05-23 18:19:59 +00:00
parent 97b3d29c2f
commit 73c09fbdbf
4 changed files with 7 additions and 4 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.38"
__version__ = "0.3.39"
__docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"

View File

@ -91,6 +91,8 @@ def Book(font_delta=0, header=None, profile=PRS500_PROFILE, **settings):
ps['header'] = header
ps['header'] = hdr
ps['topmargin'] = 10
baselineskip = (12 + 2*font_delta)*10
return _Book(textstyledefault=dict(fontsize=100+font_delta*20,
parindent=80, linespace=12), \
parindent=80, linespace=12,
baselineskip=baselineskip), \
pagestyledefault=ps, **settings)

View File

@ -1238,7 +1238,8 @@ def parse_options(argv=None, cli=True):
laf.add_option('--cover', action='store', dest='cover', default=None, \
help='Path to file containing image to be used as cover')
laf.add_option('--font-delta', action='store', type='int', default=0, \
help="""Increase the font size by 2 * FONT_DELTA pts.
help="""Increase the font size by 2 * FONT_DELTA pts and
the line spacing by FONT_DELTA pts.
If FONT_DELTA is negative, the font size is decreased.""",
dest='font_delta')
laf.add_option('--disable-autorotation', action='store_true', default=False,

View File

@ -163,7 +163,7 @@ 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['linespace']), self.pts_to_pixels(ts['wordspace'])
ls, ws = self.pts_to_pixels(ts['baselineskip']), self.pts_to_pixels(ts['wordspace'])
top, bottom, left, right = 0, 0, parindent, parindent
def add_word(width, height, left, right, top, bottom):