mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-24 04:55:57 +01:00
Fix rendering of LRF files from TOR
This commit is contained in:
parent
18d9e00938
commit
fcc5866881
2 changed files with 2 additions and 1 deletions
|
|
@ -108,6 +108,7 @@ def layout_text_block(self, block, x, y):
|
|||
line = block.peek()
|
||||
y += block.bs.topskip
|
||||
block_consumed = False
|
||||
line.height = min(line.height, self.max_y-y) # LRF files from TOR have Plot elements with their height set to 800
|
||||
while y + line.height <= self.max_y:
|
||||
block.commit()
|
||||
if isinstance(line, QGraphicsItem):
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ def finalize(self, baselineskip, linespace, vdebug):
|
|||
if self.current_link is not None:
|
||||
self.end_link()
|
||||
|
||||
# We justify is line is small and it doesn't have links in it
|
||||
# We justify if line is small and it doesn't have links in it
|
||||
# If it has links, justification would cause the boundingrect of the link to
|
||||
# be too small
|
||||
if self.current_width >= 0.85 * self.line_length and len(self.links) == 0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue