mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #102
This commit is contained in:
parent
cf84da2ce5
commit
d243ebecda
@ -36,7 +36,8 @@ class PRS500_PROFILE(object):
|
|||||||
font_size = 10 #: Default (in pt)
|
font_size = 10 #: Default (in pt)
|
||||||
parindent = 80 #: Default (in px)
|
parindent = 80 #: Default (in px)
|
||||||
line_space = 1.2 #: Default (in pt)
|
line_space = 1.2 #: Default (in pt)
|
||||||
header_size = 6 #: In pt
|
header_font_size = 6 #: In pt
|
||||||
|
header_height = 30 #: In px
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -105,17 +106,19 @@ def Book(options, font_delta=0, header=None,
|
|||||||
if header:
|
if header:
|
||||||
hdr = Header()
|
hdr = Header()
|
||||||
hb = TextBlock(textStyle=TextStyle(align='foot',
|
hb = TextBlock(textStyle=TextStyle(align='foot',
|
||||||
fontsize=int(profile.header_size*10)))
|
fontsize=int(profile.header_font_size*10)),
|
||||||
|
blockStyle=BlockStyle(blockwidth=ps['textwidth']))
|
||||||
hb.append(header)
|
hb.append(header)
|
||||||
hdr.PutObj(hb)
|
hdr.PutObj(hb)
|
||||||
ps['headheight'] = 30
|
ps['headheight'] = profile.header_height
|
||||||
ps['header'] = hdr
|
ps['header'] = hdr
|
||||||
ps['topmargin'] = 10
|
ps['topmargin'] = 0
|
||||||
ps['textheight'] = profile.screen_height - (options.bottom_margin + ps['topmargin']) - profile.fudge
|
ps['textheight'] = profile.screen_height - (options.bottom_margin + ps['topmargin'] + ps['headheight'] + profile.fudge)
|
||||||
fontsize = int(10*profile.font_size+font_delta*20)
|
fontsize = int(10*profile.font_size+font_delta*20)
|
||||||
baselineskip = fontsize + 20
|
baselineskip = fontsize + 20
|
||||||
return _Book(textstyledefault=dict(fontsize=fontsize,
|
return _Book(textstyledefault=dict(fontsize=fontsize,
|
||||||
parindent=int(profile.parindent),
|
parindent=int(profile.parindent),
|
||||||
linespace=int(10*profile.line_space),
|
linespace=int(10*profile.line_space),
|
||||||
baselineskip=baselineskip), \
|
baselineskip=baselineskip), \
|
||||||
pagestyledefault=ps, **settings)
|
pagestyledefault=ps, blockstyledefault=dict(blockwidth=ps['textwidth']),
|
||||||
|
**settings)
|
Loading…
x
Reference in New Issue
Block a user