mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Adjust baselineskip on font-delta. Use baselineskip rather than linespace in table code.
This commit is contained in:
parent
97b3d29c2f
commit
73c09fbdbf
@ -33,7 +33,7 @@ You may have to adjust the GROUP and the location of the rules file to
|
|||||||
suit your distribution.
|
suit your distribution.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "0.3.38"
|
__version__ = "0.3.39"
|
||||||
__docformat__ = "epytext"
|
__docformat__ = "epytext"
|
||||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||||
|
|
||||||
|
@ -91,6 +91,8 @@ def Book(font_delta=0, header=None, profile=PRS500_PROFILE, **settings):
|
|||||||
ps['header'] = header
|
ps['header'] = header
|
||||||
ps['header'] = hdr
|
ps['header'] = hdr
|
||||||
ps['topmargin'] = 10
|
ps['topmargin'] = 10
|
||||||
|
baselineskip = (12 + 2*font_delta)*10
|
||||||
return _Book(textstyledefault=dict(fontsize=100+font_delta*20,
|
return _Book(textstyledefault=dict(fontsize=100+font_delta*20,
|
||||||
parindent=80, linespace=12), \
|
parindent=80, linespace=12,
|
||||||
|
baselineskip=baselineskip), \
|
||||||
pagestyledefault=ps, **settings)
|
pagestyledefault=ps, **settings)
|
@ -1238,7 +1238,8 @@ def parse_options(argv=None, cli=True):
|
|||||||
laf.add_option('--cover', action='store', dest='cover', default=None, \
|
laf.add_option('--cover', action='store', dest='cover', default=None, \
|
||||||
help='Path to file containing image to be used as cover')
|
help='Path to file containing image to be used as cover')
|
||||||
laf.add_option('--font-delta', action='store', type='int', default=0, \
|
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.""",
|
If FONT_DELTA is negative, the font size is decreased.""",
|
||||||
dest='font_delta')
|
dest='font_delta')
|
||||||
laf.add_option('--disable-autorotation', action='store_true', default=False,
|
laf.add_option('--disable-autorotation', action='store_true', default=False,
|
||||||
|
@ -163,7 +163,7 @@ class Cell(object):
|
|||||||
ts = tb.textStyle.attrs
|
ts = tb.textStyle.attrs
|
||||||
default_font = get_font(ts['fontfacename'], self.pts_to_pixels(ts['fontsize']))
|
default_font = get_font(ts['fontfacename'], self.pts_to_pixels(ts['fontsize']))
|
||||||
parindent = self.pts_to_pixels(ts['parindent'])
|
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
|
top, bottom, left, right = 0, 0, parindent, parindent
|
||||||
|
|
||||||
def add_word(width, height, left, right, top, bottom):
|
def add_word(width, height, left, right, top, bottom):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user